Calculating the value of e: Difference between revisions
→bc: add
(→Python: →UNIX Shell: simplify) |
(→bc: add) |
||
Line 554:
{{out}}
<pre>The value of e = 2.71828</pre>
=={{header|bc}}==
<syntaxhighlight lang="bc">scale = 64
for (e = n = rf = 1; rf != 0; rf /= n += 1) e += rf
e</syntaxhighlight>
{{out}}
<pre>2.7182818284590452353602874713526624977572470936999595749669676254</pre>
=={{header|Befunge}}==
Befunge has no decimal capabilities, evaluates as fractions of 10^17
Line 4,022 ⟶ 4,030:
e=0 n=0 rfct=$one
while [ $((rfct /=
do
e=$((e + rfct))
|