Skip to content

Commit d5597d6

Browse files
committed
Update docs
1 parent a625660 commit d5597d6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

llvm/docs/LangRef.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16162,6 +16162,23 @@ trapping or setting ``errno``.
1616216162
The first result is the fractional part of the operand and the second result is
1616316163
the integral part of the operand. Both results have the same sign as the operand.
1616416164

16165+
Not including exceptional inputs (listed below), `llvm.modf.*` is semantically
16166+
equivalent to:
16167+
16168+
%fp = frem <fptype> %x, 1.0 ; Fractional part
16169+
%ip = fsub <fptype> %x, %fp ; Integral part
16170+
16171+
(assuming no floating-point precision errors)
16172+
16173+
If the argument is a zero, returns a zero with the same sign and a 0 exponent
16174+
for both the fractional and integral parts.
16175+
16176+
If the argument is an infinity, returns a fractional part of zero with the same
16177+
sign, and infinity with the same sign as the integral part.
16178+
16179+
If the argument is a NaN, a NaN is returned as both fractional and integral
16180+
parts.
16181+
1616516182
When specified with the fast-math-flag 'afn', the result may be approximated
1616616183
using a less accurate calculation.
1616716184

0 commit comments

Comments
 (0)