Preserve sign of negative zero

This commit is contained in:
Flavien Solt 2026-06-19 16:00:16 +08:00 committed by GitHub
parent de415b2f03
commit f963322076
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -202,9 +202,9 @@ static void draw_realnum_real(ivl_expr_t expr)
return;
}
if (value < 0) {
if (signbit(value)) {
sign = 0x4000;
value *= -1;
value = -value;
}
fract = frexp(value, &expo);