I am trying to solve a simple expression:
where a = 77617, and b = 33096.
Wolfram|Alpha returns a correct result, using following form:
a = 77617, b = 33096,
c = (333.75 - a^2) * b^6 + a^2 * (11 * a^2 * b^2 - 121 * b^4 - 2) + 5.5 * b^8 + a/(2.0 * b)
-54767/66192
which is approximately -0.827396.
Mathematica, when I evaluate the following code:
ClearAll[a, b, c]
a = N[77617, 128];
b = N[33096, 128];
N[(333.75 - a^2)*b^6 + a^2*(11*a^2*b^2 - 121*b^4 - 2) + 5.5*b^8 + a/(
2.0*b), 128]
returns 0.
Could you please to point how to get a correct result using Mathematica?
11/2and1335/4instead of5.5and333.75. – J. M.'s missing motivation Jul 10 '16 at 08:572.0; replace that with just2. What you must know here is that numbers with decimal points and no precision indicators are machine precision numbers, which was why your original expression was not being evaluated to arbitrary precision. – J. M.'s missing motivation Jul 10 '16 at 09:105.5`128or2`128. – J. M.'s missing motivation Jul 10 '16 at 09:23