committed by
Andrew Kelley
parent
201c0f54a5
commit
cffa98eef5
@@ -78,7 +78,7 @@ pub fn convertHex(comptime T: type, n_: Number(T)) T {
|
||||
|
||||
// Infinity and range error
|
||||
if (n.exponent > max_exp) {
|
||||
return math.inf(T);
|
||||
return if (n.negative) -math.inf(T) else math.inf(T);
|
||||
}
|
||||
|
||||
var bits = n.mantissa & ((1 << mantissa_bits) - 1);
|
||||
|
||||
Reference in New Issue
Block a user