[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 50 KB, 527x720, 19225275_1890177824582560_135214562475792261_n.jpg [View same] [iqdb] [saucenao] [google]
9454301 No.9454301 [Reply] [Original]

In how much divisions and their additions I can get binary float that does not round correctly to fraction?

>inb4 science, admit you are better using scientific calculators if you do not have fraction computing.

>> No.9454358

>>9454301
There's the classic 0.1+0.2, but who cares.
>science, admit you are better using scientific calculators if you do not have fraction computing.
Double precision shows errors in the 15th digit or so, which is much further than the margin of error in almost any experiment. It literally does not matter in numerical computations.
Absolute precision is really only necessary for discrete things, and for those you have integers.

Sage, go back to g.

>> No.9454447 [DELETED] 
File: 12 KB, 472x472, !!!.jpg [View same] [iqdb] [saucenao] [google]
9454447

>>9454301
vandalism is illegal.
you are reported sir

>> No.9454477

>>9454301
You can use symbolic arithmetic. Define a class or struct by a pair of integers and then define the operations like they are defined for rationals, like [math] (a,b) + (c,d) = (ad + bc, bd) [/math]

Never again worry about arithmetic errors in your life.