From 8960a2823800c4b699d319e63b7472b3628d7344 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 27 Sep 2018 15:21:04 +1000 Subject: [PATCH] lib/libm/math: Add implementation of __signbitf, if needed by a port. --- lib/libm/math.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libm/math.c b/lib/libm/math.c index 1bfa5fe93..c23b9f8d3 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};