all repos — min @ 1d555258128e0345415220db952e1a3957215af3

A small but practical concatenative programming language.

tests/math.min

 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
'test load
'test import

"math" describe

  (0 d2r sin 0 ==) assert

  (30 d2r sin 0.5 ==) assert

  (45 d2r sin 2 sqrt 2 / ==) assert

  (60 d2r sin 3 sqrt 2 / ==) assert

  (90 d2r sin 1 ==) assert

  (15 d2r sin 75 d2r cos ==) assert

  (15 cos 2 pow 15 sin 2 pow + 1 ==) assert

  (pi 4 / tan 1 ==) assert

  (e 3 pow ln 3 ==) assert

  (pi floor 3 ==) assert

  (pi 2 round 3.14 ==) assert

  (pi ceil 4 ==) assert

  (pi trunc 3 ==) assert

  report
  clear-stack