Sourcecore/math.d
cos(floatx);cos(doublex);cos(realx);| x | cos(x) | invalid? |
|---|---|---|
| NAN | NAN | yes |
| ±∞ | NAN | yes |
sin(floatx);sin(doublex);sin(realx);| x | sin(x) | invalid? |
|---|---|---|
| NAN | NAN | yes |
| ±0.0 | ±0.0 | no |
| ±∞ | NAN | yes |
rndtol(floatx);rndtol(doublex);rndtol(realx);sqrt(floatx);sqrt(doublex);sqrt(realx);| x | sqrt(x) | invalid? |
|---|---|---|
| -0.0 | -0.0 | no |
| <0.0 | NAN | yes |
| +∞ | +∞ | no |
ldexp(floatn, intexp);ldexp(doublen, intexp);ldexp(realn, intexp);Referencesfrexp
fabs(floatx);| x | fabs(x) |
|---|---|
| ±0.0 | +0.0 |
| ±∞ | +∞ |
floatx | floating point value |
Referencesequivalent tostd.math.fabs
fabs(doublex);| x | fabs(x) |
|---|---|
| ±0.0 | +0.0 |
| ±∞ | +∞ |
doublex | floating point value |
Referencesequivalent tostd.math.fabs
fabs(realx);| x | fabs(x) |
|---|---|
| ±0.0 | +0.0 |
| ±∞ | +∞ |
realx | floating point value |
Referencesequivalent tostd.math.fabs
rint(floatx);rint(doublex);rint(realx);yl2x(floatx, floaty);yl2x(doublex, doubley);yl2x(realx, realy);yl2xp1(doublex, doubley);yl2xp1(realx, realy);toPrec(T : float)(floatf);toPrec(T : float)(doublef);toPrec(T : float)(realf);toPrec(T : double)(floatf);toPrec(T : double)(doublef);toPrec(T : double)(realf);toPrec(T : real)(floatf);toPrec(T : real)(doublef);toPrec(T : real)(realf);toPrec() function forces rounding of the argumentf to the precision of the specified floating point typeT. The rounding mode used is inevitably target-dependent, but will be done in a way to maximize accuracy. In most cases, the default is round-to-nearest.| T | precision type to round to |
floatf | value to convert |