Calculating the value of e: Difference between revisions
Content added Content deleted
Basicgames (talk | contribs) |
m (→{{header|J}}) |
||
Line 2,198: | Line 2,198: | ||
<pre>The value of e = 2.71828183</pre> |
<pre>The value of e = 2.71828183</pre> |
||
=={{header|J}}== |
=={{header|J}}== |
||
<syntaxhighlight lang=J> 0j100": +/%!i.100x |
|||
⚫ | |||
2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274</syntaxhighlight> |
|||
⚫ | |||
<pre> |
<pre> |
||
NB. rational one half times pi to the first power |
NB. rational one half times pi to the first power |
||
Line 2,208: | Line 2,211: | ||
</pre> |
</pre> |
||
And in j we can write |
|||
<pre> |
<pre> |
||
1x1 NB. 1 times e^1 |
1x1 NB. 1 times e^1 |
||
Line 2,271: | Line 2,274: | ||
</pre> |
</pre> |
||
=={{header|Java}}== |
=={{header|Java}}== |
||
{{trans|Kotlin}} |
{{trans|Kotlin}} |