- #1
sara_87
- 763
- 0
Homework Statement
The precision in MATLAB is approximately 2*10^(-16),
is there a way that my computations can be calculated using a smaller precision?
Homework Equations
The Attempt at a Solution
if i want to calculate the sum of pi^2*j where j=1:20
but i want it to be computed using high precision.if i type:
b=0;
for j=1:20
b=b+pi^2*j;
end
this would use the default double precision.
I know that
vpa(b)
will give me (as a symbol) the answer to 32 decimal places. But, I don't want to display it in 32 deciaml places, i wan the inner computations to be calculated with a better precision (eg 32 decimal places).
Any ideas will be very much appreciated.