[libc-commits] [PATCH] D117590: [libc] Implement correct rounding with all rounding modes for hypot functions.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jan 20 06:42:34 PST 2022


lntue added a comment.

In D117590#3257664 <https://reviews.llvm.org/D117590#3257664>, @zimmermann6 wrote:

> after fixing my stress program I was able to find one value which does not seem to be correctly rounded (for binary32 and rounding up):
>
>   zimmerma at biscotte:~/svn/tbd/20/src/binary32$ CFLAGS=-DCHECK_CR LLVM=llvm-project VERBOSE=-v RND=rndu ./doitb.llvm hypot 1000
>   Checking hypot with llvm-project and rndu
>   Using seed 1076573
>   NEW hypot 0 -1 0x1.ffffecp-1,-0x1.000002p+27 [1.00] 1 1
>   libm gives 0x1.000002p+27
>   mpfr gives 0x1.000004p+27
>
> Please can you confirm?

Thanks Paul for catching the problem!  For some reason before my previous patch update, merging to the head had put the -fround-math compiler flags into the wrong entrypoints that I didn't notice.  After moving them back to hypotf and hypot, the results are correct on my side now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117590/new/

https://reviews.llvm.org/D117590



More information about the libc-commits mailing list