File path refactoring. No code changes. (0.37.51)
This commit is contained in:
parent
2fa8f8653e
commit
db68b30d5b
27 changed files with 0 additions and 0 deletions
34
examples/math/math_exp_log.fun
Executable file
34
examples/math/math_exp_log.fun
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env fun
|
||||
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
* Copyright 2026 Johannes Findeisen <you@hanez.org>
|
||||
* Licensed under the terms of the Apache-2.0 license.
|
||||
* https://opensource.org/license/apache-2-0
|
||||
*
|
||||
* Added: 2026-01-03
|
||||
*/
|
||||
|
||||
// Demo of exp(x), log(x), log10(x)
|
||||
|
||||
print("=== math exp/log demo start ===")
|
||||
|
||||
print("exp(0) -> " + to_string(exp(0)))
|
||||
print("log(1) -> " + to_string(log(1)))
|
||||
print("log10(1) -> " + to_string(log10(1)))
|
||||
print("exp(1) -> " + to_string(exp(1)))
|
||||
print("log(2.71828182846) ~ ln(e) -> " + to_string(log(2.71828182846)))
|
||||
|
||||
print("=== math exp/log demo end ===")
|
||||
|
||||
/* Expected output (approximate):
|
||||
=== math exp/log demo start ===
|
||||
exp(0) -> 1
|
||||
log(1) -> 0
|
||||
log10(1) -> 0
|
||||
exp(1) -> 2.718281828...
|
||||
log(2.71828182846) ~ ln(e) -> 1
|
||||
=== math exp/log demo end ===
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue