• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 
7 #include <math.h>
8 
scalbn(double x,int exp)9 double scalbn(double x, int exp)
10 {
11     return x * exp2(exp);
12 }
13 
scalbnf(float x,int exp)14 float scalbnf(float x, int exp)
15 {
16     return x * exp2f(exp);
17 }
18 
scalbnl(long double x,int exp)19 long double scalbnl(long double x, int exp)
20 {
21 #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
22     return scalbn(x, exp);
23 #else
24 #error Not supported on your platform yet
25 #endif
26 }
27 
scalbln(double x,long exp)28 double scalbln(double x, long exp)
29 {
30     return x * exp2(exp);
31 }
32 
scalblnf(float x,long exp)33 float scalblnf(float x, long exp)
34 {
35     return x * exp2f(exp);
36 }
37 
scalblnl(long double x,long exp)38 long double scalblnl(long double x, long exp)
39 {
40 #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
41     return scalbln(x, exp);
42 #else
43 #error Not supported on your platform yet
44 #endif
45 }
46