Calculating the value of e: Difference between revisions
Content added Content deleted
(→Joy: add) |
|||
Line 1,990: | Line 1,990: | ||
</pre> |
</pre> |
||
=={{header|Peri}}== |
|||
<syntaxhighlight lang="peri"> |
|||
###sysinclude standard.uh |
|||
###sysinclude math.uh |
|||
1.0e-15 sto EPSILON |
|||
one fact |
|||
2. sto en |
|||
2 sto nn |
|||
ciklus: |
|||
@en sto e0 |
|||
#g @nn++ prd fact |
|||
1.0 @fact !(#d) / sum en |
|||
@en @e0 - abs @EPSILON < else §ciklus |
|||
."e = " @en printnl |
|||
end |
|||
{ „EPSILON” } |
|||
{ „fact” } |
|||
{ „en” } |
|||
{ „e0” } |
|||
{ „nn” } |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
e = +2.71828182845905 |
|||
</pre> |
|||
=={{header|FutureBasic}}== |
=={{header|FutureBasic}}== |