RSQRT 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

rsqrtf, rsqrt, rsqrtl, rsqrtw, rsqrtq, rsqrtll, rsqrtdf, rsqrtd, rsqrtdl, rsqrtdll - reciprocal square root function

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float rsqrtf (float x);

extern double rsqrt (double x);

extern long double rsqrtl (long double x);

extern __float80 rsqrtw (__float80 x);

extern __float128 rsqrtq (__float128 x);

extern long_long_double rsqrtll (long_long_double x);

extern decimal_float rsqrtdf (decimal_float x);

extern decimal_double rsqrtd (decimal_double x);

extern decimal_long_double rsqrtdl (decimal_long_double x);

extern decimal_long_long_double rsqrtdll (decimal_long_long_double x);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the reciprocal square root of the argument, defined by rsqrt(x) == 1.0/sqrt(x).

This function is more accurate than using 1.0/sqrt(x), since it can avoid an additional rounding error from the division.


RETURN VALUES

Return the reciprocal square root of the argument.

ERRORS

If the argument is -0.0 or +0.0, return -Infinity or +Infinity, respectively, and set errno to EDOM. If the argument is negative, return a quiet NaN and set errno to EDOM. If the argument is a NaN, return that argument and set errno to EDOM.

SEE ALSO

cbrt(3CW), pow(3CW), sqrt(3CW).