Return the nearest integral value not greater in magnitude than x.
Return the nearest integral value that is not greater in absolute value than the specified x.
Special value handling: * if x is quiet NaN, quiet NaN is returned. * If x is signaling NaN, quiet NaN is returned and the value of the macro EDOM is stored into errno. * if x is +/-infinity or +/-0, it is returned unmodified.
Examples: trunc(0.5) ==> 0.0; trunc(-0.5) ==> 0.0
nearest integral value not greater in magnitude than x
| Name | Description |
|---|---|
| x | value to truncate toward zero |