Builtin mathematical intrinsics
Returns cosine of x
. x
is in radians.
x |
cos (x ) | invalid? |
---|---|---|
NAN | NAN | yes |
±∞ | NAN | yes |
x
| >= 264.Returns sine of x
. x
is in radians.
x |
sin (x ) | invalid? |
---|---|---|
NAN | NAN | yes |
±0.0 | ±0.0 | no |
±∞ | NAN | yes |
x
| >= 264.Returns x
rounded to a long value using the current rounding mode. If the integer value of x
is greater than long.max, the result is indeterminate.
Returns x
rounded to a long value using the FE_TONEAREST rounding mode. If the integer value of x
is greater than long.max, the result is indeterminate.
Compute square root of x
.
x |
sqrt (x ) | invalid? |
---|---|---|
-0.0 | -0.0 | no |
<0.0 | NAN | yes |
+∞ | +∞ | no |
ditto
Compute square root of x
.
x |
sqrt (x ) | invalid? |
---|---|---|
-0.0 | -0.0 | no |
<0.0 | NAN | yes |
+∞ | +∞ | no |
ditto
Compute square root of x
.
x |
sqrt (x ) | invalid? |
---|---|---|
-0.0 | -0.0 | no |
<0.0 | NAN | yes |
+∞ | +∞ | no |
Compute n
* 2exp
Returns |x
|
x |
fabs (x ) |
---|---|
±0.0 | +0.0 |
±∞ | +∞ |
Rounds x
to the nearest integer value, using the current rounding mode. If the return value is not equal to x
, the FE_INEXACT exception is raised. nearbyint performs the same operation, but does not set the FE_INEXACT exception.
Building block functions, they translate to a single x87 instruction.
© 1999–2017 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/core_math.html