Tag Info

New answers tagged

3

This appears to be a precision issue. Increase the precision. S[i_, j_] = 8 Sqrt[1.7^(3 i + 3 j - 6)]/ (1.7^(i - 1) + 1.7^(j - 1))^3 // Rationalize // Simplify; H[i_, j_] = -8 Sqrt[1.7^(3 i + 3 j - 6)]/ (1.7^(i - 1) + 1.7^(j - 1))^3* (0.01*(1.7^(i - 1) + 1.7^(j - 1)) - 0.01^2*1.7^(i + j - 2)) // Rationalize // Simplify; ...


7

According to Precision, the precision of a number x with absolute uncertainty dx is p -> -Log10[dx / x]. Conversely the uncertainty is given by dx -> x * 10^-p. For a calculation f[x, y, ...], the precision is estimated by Dt[f[x, y, ...] / f[x, y, ...], where Dt[x] represents the uncertainty of x and so on for any other variables. I'll show that ...


1

In your example it may be acceptable to merely Clip the input to mymod: mymod[ Clip[ Array[Exp[-(#)^2./10.] &, 500, {-100., 100.}], {$MinMachineNumber, $MaxMachineNumber} ] ] 9.8885 In a form to reapply, along with Message generation: catch::foo = "argument clipped"; catch[fn_][args__] := With[{clipped = Clip[{args}, {$MinMachineNumber, ...


5

The documentation states that Chop replaces approximate real numbers in expr that are close to zero by the exact integer 0. but you number is not approximate! Try Chop[10^-4 // N, 10^-3] It might be enlightening to evaluate 10^-4 // FullForm to see how 10^-4 is represented in Mathematica.


4

Its a bit like pulling teeth, but here is a way to preserve keyed-in numbers as strings: $PreRead = ReplaceAll[#, s_String /; StringMatchQ[s, NumberString] :> ((Characters @@ #) &@ HoldForm[s]) ] &; hisData = StringJoin /@ {0.05467, 12.34230, 4.69, 9.3452} myData = ...


3

Here is a possible implementation for explicitPrecision. explicitPrecision[x_String] := Module[{u = StringSplit[x, "."]}, If[Length[u] == 1, Return[{0, StringLength[u[[1]]]}]]; If[u[[1]] == "0", Return[{0, StringLength[u[[2]]]}]]; StringLength /@ u] explicitPrecision[".0547"] {0, 4} explicitPrecision["0.0547"] {0, 4} ...


5

Try the following, N[NestList[Cos, 15/10, 10], 10] {* {1.500000000,0.07073720167,0.9974991672,0.5424049923,0.8564697089,0.6551088018, 0.7929816458,0.7017241683,0.7637303113,0.7222610821,0.7503128857} *} SetAccuracy[NestList[Cos, 1.5, 10], 10]; SetPrecision[NestList[Cos, 1.5, 10], 10]; NumberForm[NestList[Cos, 1.5, 10], {10, 10}] {* ...



Top 50 recent answers are included