[PATCH] D149715: IR: Add llvm.frexp intrinsic

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 01:13:06 PDT 2023


foad added inline comments.


================
Comment at: llvm/docs/LangRef.rst:14798-14799
+of two such that the absolute value of the returned value is in the
+range [0.5, 1.0), with the same sign as the argument. The second
+result is that power of two.
+
----------------
"The second result is that power of two" is wrong.

frexp(2560) is { 0.625, 12 }

The argument (2560) was multiplied by some power of two (2^-12) to get 0.625, but the second result is not 2^-12 or -12, it's 12.


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

https://reviews.llvm.org/D149715



More information about the llvm-commits mailing list