how to evaluate pi out to 28 decimal places.

I am using matlab on my school campus for a math project. I have tried every way i know how to express pi out to the 28 decimal place, but i can only get it to go to the 16th place than a bunch of zeros after that. Is there a specific code that i can put in that will let me go out that far or is that the farthest..

 Respuesta aceptada

Walter Roberson
Walter Roberson el 17 de Feb. de 2011
char(vpa(sym('pi'),28))
Note that this will be a string. You can't store 28 decimal places of Pi in an IEEE 754 double precision number.

2 comentarios

Juan
Juan el 17 de Feb. de 2011
thank you that is exactly what i needed... i dont know why it was so hard for me to find
Juan
Juan el 17 de Feb. de 2011
is there anyway to write it so it does not round the last number off

Iniciar sesión para comentar.

Más respuestas (1)

Categorías

Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Feb. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by