diff options
author | Damien George <damien.p.george@gmail.com> | 2018-09-27 15:21:04 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-09-27 15:21:04 +1000 |
commit | 8960a2823800c4b699d319e63b7472b3628d7344 (patch) | |
tree | b0cc87a3913b04ffd10aab6b6fc2403b850ca311 /lib/libm/math.c | |
parent | 4c08932e735e7b75f3cdd3e0931443c088e6fd68 (diff) | |
download | micropython-8960a2823800c4b699d319e63b7472b3628d7344.tar.gz micropython-8960a2823800c4b699d319e63b7472b3628d7344.zip |
lib/libm/math: Add implementation of __signbitf, if needed by a port.
Diffstat (limited to 'lib/libm/math.c')
-rw-r--r-- | lib/libm/math.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libm/math.c b/lib/libm/math.c index 1bfa5fe93c..c23b9f8d36 100644 --- a/lib/libm/math.c +++ b/lib/libm/math.c @@ -36,6 +36,11 @@ typedef union { }; } float_s_t; +int __signbitf(float f) { + float_s_t u = {.f = f}; + return u.s; +} + #ifndef NDEBUG float copysignf(float x, float y) { float_s_t fx={.f = x}; |