Commit 90be6c5f authored by Jingwei Zhang's avatar Jingwei Zhang Committed by Mingwei Shi
Browse files

The nextafter functions use the wrong next representable value



From C99 standard: “The nextafter functions determine the next representable value, in the type of the function,
after x in the direction of y, where x and y are first converted to the type of the function”.
The next representable value of 0.0 in direction of -1.0 is -4.9406564584124654e-324, not 0.0.

Similar thing holds for nextafterf, nextafterl, nexttowardf, nexttoward, and nexttowardl.
The tests pass either way, since the error is within the tolerance, but how it is written is wrong.

Change-Id: I1338eeffe3de8031a48f46e1b07146bc07dc2f0a
Signed-off-by: default avatarJingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: default avatarMingwei Shi <mingwei.shi@intel.com>
parent 0bd28a43
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment