general update
This commit is contained in:
17
f.sl
Normal file
17
f.sl
Normal file
@@ -0,0 +1,17 @@
|
||||
import stdlib/stdlib.sl
|
||||
import stdlib/io.sl
|
||||
import stdlib/float.sl
|
||||
|
||||
extern double atan2(double y, double x)
|
||||
|
||||
: main
|
||||
# Basic math
|
||||
1.5 2.5 f+ fputln # Outputs: 4.000000
|
||||
|
||||
# External math library (libm)
|
||||
10.0 10.0 atan2 # Result is pi/4
|
||||
4.0 f* fputln # Outputs: 3.141593 (approx pi)
|
||||
|
||||
0
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user