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
|
;; -*-theme-d-*-
;; Copyright (C) 2018 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.
;; Expected results: translation and running OK
(define-proper-program (tests test688)
(import (standard-library core)
(standard-library math)
(standard-library console-io)
(tests numerical-test-env))
(define-main-proc (() <none> nonpure)
(report-test (* 4 (atan 1)) gl-r-pi)
(report-test (* 2 (atan 1)) gl-r-pi/2)
(report-test (atan 1) gl-r-pi/4)
(report-test (/ 1 gl-r-pi) gl-r-1/pi)
(report-test (/ 2 gl-r-pi) gl-r-2/pi)
(report-test (/ 2 (sqrt gl-r-pi)) gl-r-2/sqrtpi)
(report-test (sqrt 2) gl-r-sqrt2)
(report-test (exp 1) gl-r-e)
(report-test (/ 1 (log 2)) gl-r-log2e)
(report-test (/ 1 (log 10)) gl-r-log10e)
(report-test (log 2) gl-r-ln2)
(report-test (log 10) gl-r-ln10)))
|