Ramanujan's constant: Difference between revisions

no edit summary
(→‎{{header|Ruby}}: Added Ruby)
No edit summary
Line 311:
 
</lang>
 
=={{header|Mathematica}}==
<lang Mathematica>First[RealDigits[N[Exp[Pi Sqrt[163]], 200]]]
Table[
c = N[Exp[Pi Sqrt[h]], 40];
Log10[1 - FractionalPart[c]]
,
{h, {19, 43, 67, 163}}
]</lang>
{{out}}
<pre>{2,6,2,5,3,7,4,1,2,6,4,0,7,6,8,7,4,3,9,9,9,9,9,9,9,9,9,9,9,9,2,5,0,0,7,2,5,9,7,1,9,8,1,8,5,6,8,8,8,7,9,3,5,3,8,5,6,3,3,7,3,3,6,9,9,0,8,6,2,7,0,7,5,3,7,4,1,0,3,7,8,2,1,0,6,4,7,9,1,0,1,1,8,6,0,7,3,1,2,9,5,1,1,8,1,3,4,6,1,8,6,0,6,4,5,0,4,1,9,3,0,8,3,8,8,7,9,4,9,7,5,3,8,6,4,0,4,4,9,0,5,7,2,8,7,1,4,4,7,7,1,9,6,8,1,4,8,5,2,3,2,2,4,3,2,0,3,9,1,1,6,4,7,8,2,9,1,4,8,8,6,4,2,2,8,2,7,2,0,1,3,1,1,7,8,3,1,7,0,6}
 
(*Log10 of the difference between the number and an integer*)
{-0.653021767688625734085368753068345, -3.652603693775839429642336360, -5.87369134597671206721205, -12.1249807767}</pre>
 
=={{header|Nim}}==
1,111

edits