Date: Mon, 23 Jul 2018 11:28:08 -0700 From: enh <enh@google.com> To: freebsd-numerics@freebsd.org Subject: fmod nan_mix usage Message-ID: <CAJgzZopb_0fxM9jbVjUEZ0JPOfcrgeQo_Ki-afZ5aRNr38tKVg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
the recent change from return (x*y)/(x*y); to return nan_mix(x, y)/nan_mix(x, y); in e_fmod.c broke some of our unit tests. for example, fmod(3.f, 0.f) in one of the VM tests. bionic/tests/math_test.cpp:(784) Failure in test math_h_force_long_double.fmod Value of: isnan(fmod(3.0, 0.0)) Actual: false Expected: true math_h_force_long_double.fmod exited with exitcode 1. [ FAILED ] math_h_force_long_double.fmodf (13 ms) bionic/tests/math_test.cpp:(798) Failure in test math_h_force_long_double.fmodf Value of: isnanf(fmodf(3.0f, 0.0f)) Actual: false Expected: true math_h_force_long_double.fmodf exited with exitcode 1. [ FAILED ] math_h_force_long_double.fmodl (12 ms) bionic/tests/math_test.cpp:(812) Failure in test math_h_force_long_double.fmodl Value of: isnanl(fmodl(3.0L, 0.0L)) Actual: false Expected: true it looks like e_remainder.c might have the same issue, but Android's tests didn't catch that :-( i'll improve the tests...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJgzZopb_0fxM9jbVjUEZ0JPOfcrgeQo_Ki-afZ5aRNr38tKVg>