itrunc(3) osf1 man page | unix.com

Man Page: itrunc

Operating Environment: osf1

Section: 3

itrunc(3)						     Library Functions Manual							 itrunc(3)

NAME
itrunc, uitrunc - Truncate a floating-point number
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <math.h> int itrunc( double x); unsigned int uitrunc( double x);
DESCRIPTION
The itrunc function returns the signed integer nearest to the double-precision floating value x in the direction of 0.0. This effectively truncates x by discarding its fraction component. The uitrunc function also truncates the double x, but returns an unsigned integer value. If x is a NaN or a negative value that exceeds the size of a signed integer, itrunc returns INT_MIN. If x is a positive value that exceeds the size of a signed integer, itrunc returns INT_MAX. If x is a NaN or a negative value that exceeds the size of an unsigned integer, uitrunc returns a zero. If x is a positive value that exceeds the size of an unsigned integer, itrunc returns UINT_MAX.
RELATED INFORMATION
Files: float.h, fp.h, limits.h, machine/fpu.h, math.h, IEEE Standard for Binary Floating-Point Arithmetic delim off itrunc(3)
Related Man Pages
yn(3) - mojave
y0(3) - opendarwin
fp_class(3) - osf1
ieee_functions(3) - osf1
unordered(3) - osf1
Similar Topics in the Unix Linux Community
Throw my Toys out of the Pram!
Low Impact PHP Errors and Logging Levels
PHP Write Man Pages to MySQL DB
Denial Of Service Attack Update