@@ -77,10 +77,10 @@ class F64ArrayOperationTest(private val v: F64Array) {
7777 @Test fun transform () = doTestUnary(
7878 { transform(Gamma ::logGamma) }, { transformInPlace(Gamma ::logGamma) }, Gamma ::logGamma, EXACT_DELTA , " transform"
7979 )
80- @Test fun exp () = doTestUnary(F64Array ::exp, F64Array ::expInPlace, FastMath ::exp, DELTA , " exp" )
81- @Test fun expm1 () = doTestUnary(F64Array ::expm1, F64Array ::expm1InPlace, FastMath ::expm1, DELTA , " expm1" )
82- @Test fun log () = doTestUnary(F64Array ::log, F64Array ::logInPlace, Math ::log, DELTA , " log" )
83- @Test fun log1p () = doTestUnary(F64Array ::log1p, F64Array ::log1pInPlace, Math ::log1p, DELTA , " log1p" )
80+ @Test fun exp () = doTestUnary(F64Array ::exp, F64Array ::expInPlace, FastMath ::exp, PRECISE_DELTA , " exp" )
81+ @Test fun expm1 () = doTestUnary(F64Array ::expm1, F64Array ::expm1InPlace, FastMath ::expm1, PRECISE_DELTA , " expm1" )
82+ @Test fun log () = doTestUnary(F64Array ::log, F64Array ::logInPlace, Math ::log, PRECISE_DELTA , " log" )
83+ @Test fun log1p () = doTestUnary(F64Array ::log1p, F64Array ::log1pInPlace, Math ::log1p, PRECISE_DELTA , " log1p" )
8484 @Test fun unaryMinus () = doTestUnary(
8585 F64Array ::unaryMinus, { transformInPlace { - it } }, Double ::unaryMinus, EXACT_DELTA , " unaryMinus"
8686 )
@@ -271,7 +271,8 @@ class F64FlatArrayOperationTest(private val v: F64FlatArray) {
271271 * have slightly different implementation (like exponent or logarithm), some are executed out-of-order
272272 * (like sum), so you can't always expect the results to be exactly the same.
273273 */
274- private const val DELTA = 2E- 14
274+ private const val DELTA = 1E- 13
275+ private const val PRECISE_DELTA = 1E- 15
275276private const val EXACT_DELTA = 0.0
276277
277278private const val LARGE_SIZE = F64DenseFlatArray .DENSE_SPLIT_SIZE + 1
0 commit comments