Real constants and functions: Difference between revisions
Content added Content deleted
(add bqn) |
No edit summary |
||
Line 3,102: | Line 3,102: | ||
-5 |
-5 |
||
1000</pre> |
1000</pre> |
||
=={{header|V (Vlang)}}== |
|||
Many more in math module. |
|||
<syntaxhighlight lang="vlang"> |
|||
import math |
|||
fn main() { |
|||
x := -1.2345 |
|||
println("e = ${math.e}") |
|||
println("pi = ${math.pi}") |
|||
println("sqrt(4) = ${math.sqrt(4)}") |
|||
println("log(e) = ${math.log(math.e)}") |
|||
println("exp(x) = ${math.exp(x)}") |
|||
println("abs(x) = ${math.abs(x)}") |
|||
println("floor(x) = ${math.floor(x)}") |
|||
println("ceil(x) = ${math.ceil(x)}") |
|||
println("pow(-x, x) = ${math.pow(-x, x)}") |
|||
} |
|||
</syntaxhighlight> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |