manpagez: man pages & more
man fabs(3)
Home | html | info | man
fabs(3)                  BSD Library Functions Manual                  fabs(3)


NAME

     fabs -- floating-point absolute value function


SYNOPSIS

     #include <math.h>

     double
     fabs(double x);

     long double
     fabsl(long double x);

     float
     fabsf(float x);


DESCRIPTION

     The fabs() functions compute the absolute value of a floating-point num-
     ber x.


SPECIAL VALUES

     fabs(+-0) returns 0.

     fabs(+-infinity) returns +infinity.


VECTOR OPERATIONS

     If you need to apply the fabs() function to SIMD vectors or arrays, using
     the following functions provided by the Accelerate.framework may give
     significantly better performance:

     #include <Accelerate/Accelerate.h>

     vFloat vfabsf(vFloat x);
     void vvfabsf( float *y, const float *x, const int *n);
     void vvfabs(double *y, const double *x, const int *n);


SEE ALSO

     abs(3), ceil(3), floor(3), rint(3), math(3)


STANDARDS

     The fabs() functions conform to ISO/IEC 9899:2011.

BSD                            December 11, 2006                           BSD

Mac OS X 10.9.1 - Generated Tue Jan 7 19:40:57 CST 2014
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.