/**
 * This function compares the actual value with the expected value using epsilon to account for floating-point errors.
 * It checks if the absolute difference between the two values is less than or equal to a small epsilon, denoted as 1e-8.
 *
 * @param actualValue The actual value to compare.
 * @param expectedValue The expected value to compare.
 *
 * @return True if the two values are equal within the epsilon tolerance, False otherwise.
 */
fun compareEpsilon(actualValue: Double, expectedValue: Double): Boolean {

    val epsilon = 1e-8  // A very small value representating epsilon to account for floating-point errors
    
    val difference = Math.abs(actualValue - expectedValue)  // Calculate the absolute difference between the values
    
    // Check if the difference is less than or equal to epsilon
    return difference <= epsilon
}
/**
 * This function compares the actual value with the expected value using epsilon to account for floating-point errors.
 * It checks if the absolute difference between the two values is less than or equal to a small epsilon, denoted as 1e-8.
 *
 * @param actualValue The actual value to compare.
 * @param expectedValue The expected value to compare.
 *
 * @return True if the two values are equal within the epsilon tolerance, False otherwise.
 */
fun compareEpsilon(actualValue: Double, expectedValue: Double): Boolean {
/**
 * This function compares the actual value with the expected value using epsilon to account for floating-point errors.
 * It checks if the absolute difference between the two values is less than or equal to a small epsilon, denoted as 1e-8.
 *
 * @param actualValue The actual value to compare.
 * @param expectedValue The expected value to compare.
 *
 * @return True if the two values are equal within the epsilon tolerance, False otherwise.
 */
fun compareEpsilon(actualValue: Double, expectedValue: Double): Boolean {

    val epsilon = 1e-8  // A very small value representating epsilon to account for floating-point errors
    
    val difference = Math.abs(actualValue - expectedValue)  // Calculate the absolute difference between the values
    
    // Check if the difference is less than or equal to epsilon
    return difference <= epsilon
}