Exponentiation with infix operators in (or operating on) the base: Difference between revisions
Content deleted Content added
No edit summary |
Realize in F# |
||
Line 62: | Line 62: | ||
# [https://en.wikipedia.org/wiki/Order_of_operations#Programming_languages Wikipedia Order of operations in Programming languages] |
# [https://en.wikipedia.org/wiki/Order_of_operations#Programming_languages Wikipedia Order of operations in Programming languages] |
||
<br><br> |
<br><br> |
||
=={{header|F_Sharp|F#}}== |
|||
F# does not support the ** operator for integers but for floats: |
|||
<lang fsharp> |
|||
printfn "-5.0**2.0=%f; -(5.0**2.0)=%f" (-5.0**2.0) (-(5.0**2.0)) |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
-5.0**2.0=25.000000; -(5.0**2.0)=-25.000000 |
|||
</pre> |
|||
=={{header|Factor}}== |
=={{header|Factor}}== |
||
<lang factor>USING: infix locals prettyprint sequences |
<lang factor>USING: infix locals prettyprint sequences |