scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl() — Load exponent functions

Standards

Standards / Extensions C or C++ Dependencies

C99
Single UNIX Specification, Version 3
C++ TR1 C99

both

z/OS V1R7

Format

#define _ISOC99_SOURCE
#include <math.h>

double scalbn(double x, int n);
float scalbnf(float x, int n);
long double scalbnl(long double x, int n);

double scalbln(double x, long int n);
float scalblnf(float x, long int n);
long double scalblnl(long double x, long int n);

C++ TR1 C99

#define _TR1_C99
#include <math.h>

float scalbln(float x, long n); 
long double scalbln(long double x, long n); 
float scalbln(float x, long int n); 
long double scalbln(long double x, long int n);

General description

The scalbn() and scalbln() families of functions compute (x * (FLT_RADIX) raised to n) efficiently, not normally, by computing FLT_RADIX raised to n explicitly.

The radix for z/OS® C applications, FLT_RADIX, is defined to be 16 under HEX implementation and 2 under IEEE implementation.
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
scalbn X X
scalbnf X X
scalbnl X X
scalbln X X
scalblnf X X
scalblnl X X
Restriction: The scalbnf() and scalblnf() functions do not support the _FP_MODE_VARIABLE feature test macro.

Returned value

The scalbn() and scalbln() families of functions return (x * (FLT_RADIX) raised to n).

Related information