projects
/
fifth.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Rephrased documentation for better readability
[fifth.git]
/
f
/
lib
/
5th_trig
1
create sintable 8000 alloc
\r
2
\r
3
: mktable
\r
4
here push
\r
5
sintable h !
\r
6
100000000 0
\r
7
2000 do
\r
8
\r
9
over 100000 / -
\r
10
swap over + swap
\r
11
over 10000 / ,
\r
12
loop
\r
13
2drop
\r
14
pop h ! ;
\r
15
\r
16
mktable
\r
17
forget mktable
\r
18
\r
19
: cos ( num -- result)
\r
20
abs 2000 mod 4 * sintable + @ ;
\r
21
\r
22
: sin 500 - cos ;
\r
23
\r
24
rh sintable
\r