amath
1.8.5
Simple command line calculator
|
Truncate function. More...
#include "prim.h"
Go to the source code of this file.
Functions | |
double | trunc (double x) |
Truncate function. More... | |
Truncate function.
Definition in file trunc.c.
double trunc | ( | double | x | ) |
Truncate function.
when x > 0 trunc(0) = floor(x)
when x < 0 trunc(x) = ceil(x)
Special case trunc(0) = 0 trunc(NaN) = NaN
Definition at line 52 of file trunc.c.
References ceil(), and floor().
Referenced by ctrunc(), DecimalSystem::GetText(), PositionalNumeralSystem::GetText(), PositionalNumeralSystem::IntegerToBuffer(), and RealNumber::Trunc().