Anonymous user
Ramanujan's constant: Difference between revisions
m
→{{header|REXX}}: added a hyphen to a word.
m (→{{header|REXX}}: added a hyphen to a word.) |
|||
Line 520:
=={{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
<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*/
|