[Tutor] precision handling

dn PyTutor at DancesWithMice.info
Fri Oct 1 06:50:07 EDT 2021


On 01/10/2021 23.30, Alan Gauld wrote:
> On 01/10/2021 09:30, Msd De wrote:
...

> Sometimes modifying the order of the operations can make a difference too.
> 
> For example:
> 
> a/b + c/b
> 
> can sometimes give a better result than
> 
> (a+c)/b
> 
> because the two numbers may be closer in magnitudes.
> But at other times it may be worse!
> 
> Working with floats is a precarious pastime.

Perhaps the NA-entry applies?
https://xkcd.com/2520/ (Symbols and what they mean)
-- 
Regards,
=dn


More information about the Tutor mailing list