File: math64.l

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (48 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 02aug10abu
# (c) Software Lab. Alexander Burger

(setq
   "Dbl1" (0 . 1.0)
   "Dbl2" (0 . 1.0) )

(de pow (X Y)
   (set "Dbl1" X  "Dbl2" Y)
   (native "@" "pow" 1.0 "Dbl1" "Dbl2") )

(de exp (X)
   (set "Dbl1" X)
   (native "@" "exp" 1.0 "Dbl1") )

(de log (X)
   (when (gt0 (set "Dbl1" X))
      (native "@" "log" 1.0 "Dbl1") ) )

(de sin (A)
   (set "Dbl1" A)
   (native "@" "sin" 1.0 "Dbl1") )

(de cos (A)
   (set "Dbl1" A)
   (native "@" "cos" 1.0 "Dbl1") )

(de tan (A)
   (set "Dbl1" A)
   (native "@" "tan" 1.0 "Dbl1") )

(de asin (A)
   (set "Dbl1" A)
   (native "@" "asin" 1.0 "Dbl1") )

(de acos (A)
   (set "Dbl1" A)
   (native "@" "acos" 1.0 "Dbl1") )

(de atan (A)
   (set "Dbl1" A)
   (native "@" "atan" 1.0 "Dbl1") )

(de atan2 (X Y)
   (set "Dbl1" X  "Dbl2" Y)
   (native "@" "atan2" 1.0 "Dbl1" "Dbl2") )

# vi:et:ts=3:sw=3