[ 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

Search:


View post   

>> No.9921500 [View]
File: 559 KB, 1080x1920, Screenshot_20180806-181743.png [View same] [iqdb] [saucenao] [google]
9921500

>>9921439
Floating point arithmetic is both interesting and infuriating. Basically, substracting similarly sized numbers brings out the low level noise first and forfront, which if you then follow up with a large multiplication can totally destroy your results.

It's called catastrophic cancellation, see pic related. It's the reason numerical differentiation can't be done with the standard derivative formula, because f(x+h)-f(x) destroys your precision.

If you use op's retarded formula, and then multiply it by a large number (to calculate an area for an integral for eg), it will likely induce catastrophic cancellation.

Navigation
View posts[+24][+48][+96]