Ramanujan's constant: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: added the REXX computer programming language for this task.) |
m (→{{header|REXX}}: added wording to the REXX section header.) |
||
Line 231: | Line 231: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
Instead of calculating <big> '''e''' </big> and <big><big><math>\pi</math></big></big> to some arbitrary length, it was easier to just include those two constants with '''201''' decimal digits (which is the amount of decimal digits used for the calculations). The results are displayed (right justified) with one half of that number of decimal digits. |
|||
<lang rexx>/*REXX pgm displays Ramanujan's constant to at least 100 decimal digits of precision. */ |
<lang rexx>/*REXX pgm displays Ramanujan's constant to at least 100 decimal digits of precision. */ |
||
d= min( length(pi()), length(e()) ) - length(.) /*calculate max #decimal digs supported*/ |
d= min( length(pi()), length(e()) ) - length(.) /*calculate max #decimal digs supported*/ |