trunc(), truncf(), truncl()

nearest integral value with magnitude less than or equal to x 

Function


SYNOPSIS

#include <math.h>

double trunc(double x)

float truncf(float x)

long double truncl(long double x)


DESCRIPTION

The trunc(), truncf(), and truncl() functions return the nearest integral value with magnitude less than or equal to x. They are equivalent to rint(), rintf(), and rintl() respectively, in the FP_RZ rounding mode.


PARAMETERS

x 

Is the number that is to be truncated.


RETURN VALUES

The trunc(), truncf(), and truncl() functions return the nearest integral value with magnitude less than or equal to x.


CONFORMANCE

ANSI/ISO 9899-1999


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
ceil(), floor(), math(), nextafter(), rint(), round()


PTC MKS Toolkit 10.4 Documentation Build 39.