diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-09-08 13:32:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 13:32:20 -0400 |
| commit | 6237dc0ab8fcb6fc14b97b2ea5494a488e94e492 (patch) | |
| tree | 5859d6c7c5cb3b2eff175caf8f5f81f543fd3f42 /lib | |
| parent | 501e6cf2f3ff26246173df98b3bc5194afec5681 (diff) | |
| parent | 343547d4a4cf8a98b6380881aa310fa7868e7486 (diff) | |
| download | zig-6237dc0ab8fcb6fc14b97b2ea5494a488e94e492.tar.gz zig-6237dc0ab8fcb6fc14b97b2ea5494a488e94e492.zip | |
Merge pull request #9700 from marler8997/bootstrapAarch64Windows
changes to build zig-bootstrap aarch64-windows
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/mingw/math/arm-common/scalbn.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/libc/mingw/math/arm-common/scalbn.c b/lib/libc/mingw/math/arm-common/scalbn.c new file mode 100644 index 0000000000..0e2f14ab7c --- /dev/null +++ b/lib/libc/mingw/math/arm-common/scalbn.c @@ -0,0 +1,45 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include <math.h> + +double scalbn(double x, int exp) +{ + return x * exp2(exp); +} + +float scalbnf(float x, int exp) +{ + return x * exp2f(exp); +} + +long double scalbnl(long double x, int exp) +{ +#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) + return scalbn(x, exp); +#else +#error Not supported on your platform yet +#endif +} + +double scalbln(double x, long exp) +{ + return x * exp2(exp); +} + +float scalblnf(float x, long exp) +{ + return x * exp2f(exp); +} + +long double scalblnl(long double x, long exp) +{ +#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) + return scalbln(x, exp); +#else +#error Not supported on your platform yet +#endif +} |
