;; Test the core functions (in-package :ll-user) (defparameter test-core (make-test-suite "test core")) (def-test-ok test-core "Simple artihmetic 1" (approx= (.* 2 (.+ 1 2)) (- 7.0 (.^ 5 0)))) (def-test-ok test-core ".= ./= .> .>= .< .<= no 1" (= 1 (.* (.= 2 2.0) (.< 2 3) (.<= 2 3) (./= 2 1e42) (.> 3 -12) (.>= 3 3.0)))) (def-test-ok test-core ".= ./= .> .>= .< .<= no 2" (= 0 (.+ (.= 2 4.0) (.< 3 3) (.<= 22 3) (./= 2 2.0) (.> 3.0 12) (.>= 3 4.0)))) (def-test-ok test-core "exp and log 1" (approx= (.ln (.exp 3)) 3.0)) (def-test-ok test-core "exp and log 2" (approx= (.log (.^ 10 3) 10) 3.0)) (def-test-ok test-core "sin cos tan" (approx= (.sin (.cos (.tan 12.2))) 0.7999958256500729)) (def-test-ok test-core "acos asin atan" (approx= (.acos (.asin (.atan 0.2))) 1.3707645308684668)) (def-test-ok test-core "cosh sinh tanh" (approx= (.cosh (.sinh (.tanh 0.9))) 1.3192003762036524)) (def-test-ok test-core "acosh asinh atanh" (approx= (.acosh (.asinh (.atanh 0.9))) 0.590153719104004))