decimal: diallow infinity and NaN entirely.
While arithmetic operations do not return infinities or NaNs, it is possbile to construct an invalid decimal value from strings 'Infinity', 'NaN' and similar. Some decimal mathematic functions may also result in an infinity, say, ln(0) yields '-Infinity'. So, add checks that the number is not a NaN or infinity after each operation, so that the operation either returns an error, or a valid finite decimal number. Follow-up 6d62c6c1
Loading
Please register or sign in to comment