3 ms·
Unfortunately, that doesn't work when you have to do: 1 - quantity2 / (quantity1 - quantity2) ... or some such thing. If quantity1 and 2 are similar, ouch!
by tehjoker 5y ago
Unfortunately, that doesn't work when you have to do:
1 - quantity2 / (quantity1 - quantity2)
... or some such thing. If quantity1 and 2 are similar, ouch!
- exporectomy 5y agoNot 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.