Skip to content

Commit 3cf7196

Browse files
softfloat: logB(0) should raise divideByZero exception
logB(0) should raise divideByZero exception from IEEE 754-2008 spec 7.3 Suggested-by: Richard Henderson <[email protected]> Signed-off-by: Song Gao <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent 1536201 commit 3cf7196

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fpu/softfloat-parts.c.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ static void partsN(log2)(FloatPartsN *a, float_status *s, const FloatFmt *fmt)
14361436
parts_return_nan(a, s);
14371437
return;
14381438
case float_class_zero:
1439+
float_raise(float_flag_divbyzero, s);
14391440
/* log2(0) = -inf */
14401441
a->cls = float_class_inf;
14411442
a->sign = 1;

0 commit comments

Comments
 (0)