Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure if there's a mistake in that expression, since if they're similar, you're already going to get some ridiculously large magnitude (unphysical) result. Maybe you mean calculating the error between two values or convergence testing? In that case, it hardly matters if whether you do

quantity2/quantity1 - 1

or

(quantity2 - quantity1) / quantity1

with double precision and physically reasonable values.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: