add inner (of lists) type, add floor, ceil, and roundd standard functions, and a ton of examples
This commit is contained in:
parent
5bcab07681
commit
efbe5a9f97
20 changed files with 330 additions and 46 deletions
13
examples/solving.ang
Normal file
13
examples/solving.ang
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import "../lib/math.ang"
|
||||
|
||||
a := 120
|
||||
b := 10
|
||||
|
||||
# find log_b(a)
|
||||
func f(x: number)number {
|
||||
return pow(b, x) - a
|
||||
}
|
||||
|
||||
log_b := newtons(f)
|
||||
write(str(log_b))
|
||||
write("inverse: "+str(pow(b, log_b))+" = "+str(a))
|
||||
Loading…
Add table
Add a link
Reference in a new issue