*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> uitrunc (3)              
Title
Content
Arch
Section
 

itrunc(3)

Contents


NAME    [Toc]    [Back]

       itrunc, uitrunc - truncate a floating-point number

SYNOPSIS    [Toc]    [Back]

       #include <math.h>

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

LIBRARY    [Toc]    [Back]

       Standard C Library (libc.a)

DESCRIPTION    [Toc]    [Back]

       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.

SEE ALSO    [Toc]    [Back]

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

       IEEE Standard for Binary Floating-Point Arithmetic



                                                        itrunc(3)
[ Back ]
 Similar pages
Name OS Title
fpclassify FreeBSD classify a floating-point number
isfinite FreeBSD classify a floating-point number
isinf FreeBSD classify a floating-point number
isnan FreeBSD classify a floating-point number
isnormal FreeBSD classify a floating-point number
fabs Linux absolute value of floating-point number
gcvt Linux convert a floating-point number to a string.
ecvt Linux convert a floating-point number to a string.
isnan IRIX determine type of floating-point number
ecvt IRIX convert floating-point number to string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service