Consider the following operation, effectively raising 1.0003
to the zeroth power, which should give 1
to high precision. But the output answer is correct only to 2 digits. What am I doing wrong?
setprecision(BigFloat, 2048) do
N = BigFloat("1.0003")
S = N^2
T = S^BigFloat("-2")
println(S)
println(T)
@show N.prec
@show S.prec
@show T.prec
end
1.00060009000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006
0.998800899460283363981209766821321428156826636405424484661643582132123833869202023941249413307299194267877540193491761251973877782287932256911154666379139503538676939375046908448816853422361662343762039258796959186150590922100709574753779447800773573318277742654515673496936793187681961445711493463612642920501001030401197976389749419078717542211077880390587563193868612391879372663858784504235958579674789390475785580413842269254173277611464659432178456393544620005898511928430355155204871700689570839489110507083202535467976028287920518240107473247937569049542696259772380374569992504464097465007950669492921731039225
N.prec = 2048
S.prec = 2048
T.prec = 2048