diff --git a/libs/libc/stdio/lib_dtoa_engine.c b/libs/libc/stdio/lib_dtoa_engine.c index 51e9b3902c..4bc8884f91 100644 --- a/libs/libc/stdio/lib_dtoa_engine.c +++ b/libs/libc/stdio/lib_dtoa_engine.c @@ -69,7 +69,7 @@ int __dtoa_engine(double x, FAR struct dtoa_s *dtoa, int max_digits, uint8_t flags = 0; int i; - if (__builtin_signbit(x)) + if (x < 0) { flags |= DTOA_MINUS; x = -x;