Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > F

floor(3M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

floor(), floorf(), floorl(), floorw(), floorq() — floor functions

SYNOPSIS

#include <math.h>

double floor(double x);

HP Integrity Server Only

float floorf(float x);

long double floorl(long double x);

extended floorw(extended x);

quad floorq(quad x);

DESCRIPTION

The floor() returns the largest integer (represented as a double-precision number) not greater than x.

Integrity Server Only

floorf() is a float version of floor(); it takes a float argument and returns a float result.

floorl() is a long double version of floor(); it takes a long double argument and returns a long double result.

floorw() is an extended version of floor(); it takes an extended argument and returns an extended result.

floorq() is equivalent to floorl() on HP-UX systems.

USAGE

To use (for Integrity servers) floorf(), compile either with the default -Ae option or with the -Aa option.

To use (for Integrity servers) floorl(), floorw(), or floorq(), compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.

To use (for Integrity servers) floorw() or floorq(), compile also with the -fpwidetypes option.

To use these functions, make sure your program includes <math.h>. Link in the math library by specifying -lm on the compiler or linker command line.

For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site: http://www.hp.com/go/fp.

RETURN VALUE

If x is ±INFINITY or ±zero, floor() returns x.

If x is NaN, floor() returns NaN.

floor() may raise the inexact exception if x is non integral and finite.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

floor() : SVID3, XPG4.2, ANSI C, ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arithmetic'')

floorf(), floorl() : ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arithmetic'')

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.