OAR

RTEMS GNU Tools On-Line Library


ilogb

PREV UP NEXT Bookshelf

1.33: ilogb, ilogbf---get exponent of floating point number

Synopsis

#include <math.h>
int ilogb(double val);
int ilogbf(float val);

Description

All non zero, normal numbers can be described as m * 2**p. ilogb and ilogbf examine the argument val, and return p. The functions frexp and frexpf are similar to ilogb and ilogbf, but also return m.


Returns

ilogb and ilogbf return the power of two used to form the floating point argument. If val is 0, they return - INT_MAX (INT_MAX is defined in limits.h). If val is infinite, or NaN, they return INT_MAX.


Portability
Neither ilogb nor ilogbf is required by ANSI C or by the System V Interface Definition (Issue 2).


PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.