itrunc man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

itrunc(3)							     itrunc(3)

NAME
       itrunc, uitrunc - truncate a floating-point number

SYNOPSIS
       #include <math.h>

       int itrunc(
	       double x ); unsigned int uitrunc(
	       double x );

LIBRARY
       Standard C Library (libc.a)

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() func‐
       tion 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.

SEE ALSO
       Files: float.h, fp.h, limits.h, machine/fpu.h, math.h,

       IEEE Standard for Binary Floating-Point Arithmetic

								     itrunc(3)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net