bollu / bollu.github.io

code + contents of my website, and programming life
http://bollu.github.io/
361 stars 23 forks source link

a-hackers-guide-to-numerical-analysis #21

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

A Universe of Sorts

http://bollu.github.io/a-hackers-guide-to-numerical-analysis.html

ziofil commented 3 years ago
  1. absolute errror <--- typing error ^^
crdrost commented 3 years ago

It is not transparent to me why this definition is sensible.

Exponentials and logarithms are inverses of each other, so the "significant figures" calculation is, roughly, the base-10 logarithm of the relative error, from which the relative error can be calculated. "I know it to 5 significant figures" is roughly "I know it to one part in 105." It's a crude way of speaking. A half-significant-figure is a factor of roughly 3 because 32 is nine which is roughly 10, to get slightly more granular ("two and a half orders of magnitude" = a factor of 300ish).

Note that the rules are somewhat subtle involving actual manipulations, indeed there are these problems with catastrophic cancellation etc.

ziofil commented 3 years ago

That reminds me, there exist tools to automatically (within limits) find the most accurate version of a computation: https://herbie.uwplse.org

jmbr commented 3 years ago

Nice collection of topics!

Suggestion: mention the expm1 function when discussing $e^x - 1$

falematte commented 3 years ago

Are you using org-babel to execute C blocks?