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 &nbsp; <big> '''e''' </big> &nbsp; and &nbsp; <big><big><math>\pi</math></big></big> &nbsp; to some arbitrary length, &nbsp; it was easier to just include those two constants with &nbsp; '''201''' &nbsp; decimal digits &nbsp; (which is the amount of decimal digits used for the calculations). &nbsp; The results are displayed &nbsp; (right justified) &nbsp; with one -half of that number of decimal digits past the decimal point.
<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*/