Calculating the value of e: Difference between revisions
Content deleted Content added
Kinitawowi (talk | contribs) No edit summary |
→{{header|Ruby}}: use predefined EPSILON |
||
Line 1,421:
=={{header|Ruby}}==
{{trans|C}}
<lang
fact = 1
e = 2
e0 = 0
n = 2
until (e - e0).abs < Float::EPSILON do
e0 = e
fact *= n
Line 1,439 ⟶ 1,435:
puts e
</lang>
|