8:18 AM
@MichaelE2 Only the complex answer is wrong, no? The first I interpret as "Integrate from exactly zero to some different number very very close to zero", and the answer is some number very close to zero. The last one I read as: "integrate from a not-precisely-defined number to exactly that same number", which is not number very very close to zero, but exactly zero.
10 hours later…
6:20 PM
@rhermans None of them are incorrect, are they? As for the precision in the last, your argument should apply to
1. - 1.
, since we're subtracting identical numbers; however, we get 0.
, not 0
. The docs contain things like "When you do calculations with machine-precision numbers, however, the Wolfram Language always gives you a machine-precision result." Sometimes they hedge by including the word "typically." Integrate[Sin[x], {x, 1.000001`6, 1.000003`6}] (* 0.*10^-6 + 0.*10^-12 I *) Integrate[Sin[x], {x, 1.0000001`6, 1.000003`6}] (* 0 *)
The second integral, on the face of it, seems greater than the first. But the first is reported with a positive uncertainty and the second is an exact zero. I'm fine with it being some kind of zero. It seems less ok for a computation to shift from machine-precision to exact, though. Exact can be slow and hog memory.
« first day (4625 days earlier) ← previous day next day → last day (16 days later) »