MirBSD manpage: scalbn(3), scalbnf(3)

SCALBN(3)                  BSD Programmer's Manual                   SCALBN(3)

NAME

     scalbn, scalbnf - exponent using FLT_RADIX

LIBRARY

     libm

SYNOPSIS

     #include <math.h>

     double
     scalbn(double x, int n);

     float
     scalbnf(float x, int n);

DESCRIPTION

     The scalbn() and scalbnf() functions compute x * r^n, where r is the ra-
     dix of the machine's floating point arithmetic, defined by the FLT_RADIX
     constant in <float.h>. The rationale is efficiency; r^n is not computed
     explicitly.

RETURN VALUES

     As described above, upon successful completion, the described functions
     return the exponent computed using FLT_RADIX. Otherwise the following may
     occur:

           1.   When the result would cause an overflow, a range error occurs
                and +-HUGE_VAL, +-HUGE_VALF, or +-HUGE_VALL is returned ac-
                cording to the sign of x and the return type of the
                corresponding function.

           2.   When the correct value would cause an underflow and it is not
                representable, a range error occurs and either 0.0 or an
                implementation-defined value is returned. When an underflow
                occurs but the correct value is representable, a range error
                occurs but the correct value is returned.

           3.   If x is +-0 or +-Inf, x is returned. Likewise, if n is zero, x
                is returned. If x is NaN, NaN is returned.

SEE ALSO

     exp(3), frexp(3), ldexp(3), math(3)

STANDARDS

     The described functions conform to ISO/IEC 9899:1999 ("ISO C99").

MirBSD #10-current             February 9, 2014                              1

Generated on 2022-12-24 01:00:14 by $MirOS: src/scripts/roff2htm,v 1.113 2022/12/21 23:14:31 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2022 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.

Kontakt / Impressum & Datenschutzerklärung