picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

math.l (641B)


      1 # 31oct12abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 (scl 6)
      5 (load "@lib/math.l")
      6 
      7 ### pow ###
      8 (test 8.0 (pow 2.0 3.0))
      9 (test 8.0 (pow 64.0 0.5))
     10 
     11 ### exp ###
     12 (test 2.718282 (exp 1.0))
     13 
     14 ### log ###
     15 (test 0.693147 (log 2.0))
     16 
     17 ### sin ###
     18 (test 0.0 (sin 0.0))
     19 (test 1.0 (sin (/ pi 2)))
     20 
     21 ### cos ###
     22 (test 1.0 (cos 0.0))
     23 (test -1.0 (cos pi))
     24 
     25 ### tan ###
     26 (test 0.0 (tan 0.0))
     27 (test 0.0 (tan pi))
     28 
     29 ### asin ###
     30 (test 0.0 (asin 0.0))
     31 (test (/ pi 2) (asin 1.0))
     32 
     33 ### acos ###
     34 (test 0.0 (acos 1.0))
     35 (test pi (acos -1.0))
     36 
     37 ### atan ###
     38 (test 0.0 (atan 0.0))
     39 
     40 ### atan2 ###
     41 (test 0.0 (atan2 0.0 1.0))
     42 (test (/ pi 2) (atan2 1.0 0.0))
     43 
     44 # vi:et:ts=3:sw=3