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/2
and1335/4
instead of5.5
and333.75
. $\endgroup$2.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. $\endgroup$5.5`128
or2`128
. $\endgroup$