diff --git a/tgt-vvp/eval_real.c b/tgt-vvp/eval_real.c index a61ab0f39..0c685624f 100644 --- a/tgt-vvp/eval_real.c +++ b/tgt-vvp/eval_real.c @@ -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);