Calculates the signed exponent of a double precision floating-point value.
Include
<math.h>
Prototype
float scalblnf(float x, long int n);
Argument
x
n
FLT_RADIX
is raisedReturn Value
Efficiently calculates and returns the value of x
times
FLT_RADIX
n
.
Remarks
A range error might occur.
Example
#include <math.h>
#include <stdio.h>
#include <errno.h>
int main(void)
{
float x, y;
long int power;
errno = 0;
x = 13.45;
power = 8;
y = scalblnf(x, power);
if (errno)
perror("Error");
printf("FLT_RADIX raised to the power %ld, times %f is %f\n", power, x, y);
}
Example Output
FLT_RADIX raised to the power 8, times 13.450000 is 3443.200000