modf

Splits x in integral and fractional part.

D
modf
(
D
)
(
auto const ref D x
,
ref D y
)

Parameters

x D

value to split

y D

value of x truncated toward zero

Return Value

Type: D

Fractional part of x.

Throws

$(BOOKTABLE,

InvalidOperationExceptionx is signaling NaN

Special values

xmodf(x)y
NaNNaNNaN
0.00.00.0
±∞0.0±∞

Meta