Bug SS-3518
1 vote

Rounding problems

Created by Martin Kraska on 3/19/2018 11:37 PM Last Updated by Martin Kraska on 4/7/2024 6:43 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

Something wrong here. applies to 6638 and 6648

 

    Martin Kraska (Sunday, April 7, 2024 6:41 PM) #

The problem seems to be related to internal number representation rather than to the rounding function. 

See the attached document. 

    Martin Kraska (Sunday, April 7, 2024 3:45 PM) #

Still persistent in 8763. To add complexity, the rounding behaviour seems to be dependent on irrelevant digits. The first line shows correct behavior, the second is wrong.

    Martin Kraska (Wednesday, August 2, 2023 6:45 PM) #

Still persisting...

Would be important for all who use SMath in teaching. 

    Martin Kraska (Thursday, March 22, 2018 2:02 AM) #

Anything that can go wrong will go wrong

Who would guess that rounding is a challenge in math software....

Same problem with mono btw.

    smath (Thursday, March 22, 2018 1:25 AM) #

I can't believe how EVERYTHING is complex! Any little step forward is a real headache...

 

In this case I'm using built-in .Net methods to round a number and... what a surprise... they can give errors!

It seems I have to implement manually even them! Ah, life is not a fun!