[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/0fb66f092b897b55318509c6582008b3f912311a Fix issue 17562 - tan returning -nan for inputs where abs(x) >= 2^63 --
[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/0fb66f092b897b55318509c6582008b3f912311a Fix issue 17562 - tan returning -nan for inputs where abs(x) >= 2^63 --
[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/0fb66f092b897b55318509c6582008b3f912311a Fix issue 17562 - tan returning -nan for inputs where abs(x) >= 2^63 The fptan instruction pushes a 1.0 onto the FPU register stack after a successful operation, but when abs(input) >= 2^63 the C2 flag is set to indicate that the input was out of bounds, and it doesn't push the 1.0. Prior to this PR, the top value of the FPU stack was popped irrespective of whether C2 was set, which in the case of an out-of-bounds input caused the input to be removed from the stack and ultimately resulted in an incorrect return value of -nan. This PR changes this behavior, only popping after fptan when C2 was not set. See: http://x86.renejeschke.de/html/file_module_x86_id_109.html * Added unit tests for handling out-of-range inputs of fptan --
[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 Vladimir Panteleev changed: What|Removed |Added Keywords||pull CC||dlang-bugzilla@thecybershad ||ow.net --
[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 Sophie changed: What|Removed |Added OS|Mac OS X|All Severity|enhancement |minor --
[Issue 17562] Tangent function returns NaN for abs(input) >= 2^63
https://issues.dlang.org/show_bug.cgi?id=17562 Sophie changed: What|Removed |Added Assignee|nob...@puremagic.com|meapineap...@gmail.com --