Post subject: Re: BASIC crashes when useing ROUND() with "NAN" as input
Posted: Tue Mar 21, 2017 12:41 am
Joined: Wed Oct 03, 2012 9:53 am Posts: 2778 Location: Colorado, U.S.
Thanks, Brochi. My implementation of ROUND() with the optional rounding mode parameter uses Java's BigDecimal. The docs for BigDecimal say it throws an error if you give it "infinity" or "not a number". I did not think about testing either of those cases.
We have talked about problems with NaN before. and I don't think we decided on a final solution. Perhaps you can refresh my memory: were there any bad problems, like this crash?
Fixing this crash is simple. Fixing all cases of NaN is not. We may have to fix them as we find them.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum