[llvm-bugs] [Bug 34994] sqrt(denormal float) gives -infinity with fast-math
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 22 13:23:16 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=34994
Fangrui Song <i at maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Assignee|unassignedbugs at nondot.org |spatel+llvm at rotateright.com
CC| |i at maskray.me
--- Comment #19 from Fangrui Song <i at maskray.me> ---
Mark as fixed.
x86-64 and aarch64
% for i in ieee preserve-sign positive-zero; do clang++ a.cc -ffast-math
-fdenormal-fp-math=$i && ./a.out; done
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
sqrt(0) = 0
ppc64le (POWER9)
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(9.99999935e-39) = 9.99999968e-20
sqrt(9.9999461e-41) = 9.99997303e-21
sqrt(1.0005271e-42) = 1.00026351e-21
sqrt(9.80908925e-45) = 9.90408493e-23
sqrt(0) = 0
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(9.99999935e-39) = 9.99999968e-20
sqrt(9.9999461e-41) = 9.99997303e-21
sqrt(1.0005271e-42) = 1.00026351e-21
sqrt(9.80908925e-45) = 9.90408493e-23
sqrt(0) = 0
sqrt(1.00000005e-34) = 9.99999984e-18
sqrt(1.00000004e-36) = 1.00000005e-18
sqrt(9.99999935e-39) = 9.99999968e-20
sqrt(9.9999461e-41) = 9.99997303e-21
sqrt(1.0005271e-42) = 1.00026351e-21
sqrt(9.80908925e-45) = 9.90408493e-23
sqrt(0) = 0
The input constants the 3 arches use are the same.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210722/8eb2b21a/attachment.html>
More information about the llvm-bugs
mailing list