← Back to context

Comment by exporectomy

4 years ago

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.