1scalbln(3M) Mathematical Library Functions scalbln(3M)
2
3
4
6 scalbln, scalblnf, scalblnl, scalbn, scalbnf, scalbnl - compute expo‐
7 nent using FLT_RADIX
8
10 c99 [ flag... ] file... -lm [ library... ]
11 #include <math.h>
12
13 double scalbln(double x, long n);
14
15
16 float scalblnf(float x, long n);
17
18
19 long double scalblnl(long double x, long n);
20
21
22 double scalbn(double x, int n);
23
24
25 float scalbnf(float x, int n);
26
27
28 long double scalbnl(long double x, int n);
29
30
32 These functions compute x * FLT_RADIX^n efficiently, not normally by
33 computing FLT_RADIX^n explicitly.
34
36 Upon successful completion, these functions return x * FLT_RADIX^n>.
37
38
39 If the result would cause overflow, a range error occurs and these
40 functions return ±HUGE_VAL, ±HUGE_VALF, and ±HUGE_VALL (according to
41 the sign of x) as appropriate for the return type of the function.
42
43
44 If x is NaN, a NaN is returned.
45
46
47 If x is ±0 or ±Inf, x is returned.
48
49
50 If x is 0, x is returned.
51
53 These functions will fail if:
54
55 Range Error The result overflows.
56
57 If the integer expression (math_errhandling &
58 MATH_ERREXCEPT) is non-zero, then the overflow floating-
59 point exception is raised.
60
61
63 An application wanting to check for exceptions should call feclearex‐
64 cept(FE_ALL_EXCEPT) before calling these functions. On return, if
65 fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is
66 non-zero, an exception has been raised. An application should either
67 examine the return value or check the floating point exception flags to
68 detect exceptions.
69
71 See attributes(5) for descriptions of the following attributes:
72
73
74
75
76 ┌─────────────────────────────┬─────────────────────────────┐
77 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
78 ├─────────────────────────────┼─────────────────────────────┤
79 │Interface Stability │Standard │
80 ├─────────────────────────────┼─────────────────────────────┤
81 │MT-Level │MT-Safe │
82 └─────────────────────────────┴─────────────────────────────┘
83
85 feclearexcept(3M), fetestexcept(3M), math.h(3HEAD), scalb(3M),
86 attributes(5), standards(5)
87
88
89
90SunOS 5.11 12 Jul 2006 scalbln(3M)