# Search Results

Results tagged with Search options user 21750
5 results

Questions on the numerical functions of Mathematica, implementing numerical methods and numerical computing with Mathematica.

This function returns the location of the first place at which the decimal representations of the given numbers differ. firstDecimalPlaceDifference[x__] := If[Equal @@ SetPrecision[{x}, Infinity], …
answered Mar 9 '15 by 2012rcampion
It seems I found my answer in OleksandrR's comment to this question. He says, Bear in mind Equal applies an extra tolerance in Mathematica. The proper comparison is Block[{Internal$EqualToleran … answered Mar 10 '15 by 2012rcampion Instead of doing the integration yourself, why not have Mathematica do it for you? g = 6.674*^-11; dt = 0.001; tStop = 2000; soln = First@NDSolve[{ x1''[t] == g (m2/Norm[x2[t] - x1[t]]^3 ( … answered Apr 26 '15 by 2012rcampion 2answers Let's define two different numbers. x = 1. y = 1. + 2^-52 (* equivalently, 1 +$MachineEpsilon *) Let's make sure they're different with FullForm: x // FullForm (* 1. *) y // FullForm (* 1.000000 …
asked Mar 9 '15 by 2012rcampion
If you can tolerate some slowdown, use arbitrary-precision numbers instead of machine-precision numbers. Unlike machine-precision numbers, arbitrary-precision numbers keep track of how error propagat …
answered Jan 29 '15 by 2012rcampion