File: test235.thp

package info (click to toggle)
theme-d 7.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,036 kB
  • sloc: lisp: 9,625; sh: 5,321; makefile: 715; ansic: 477
file content (63 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download | duplicates (5)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
;; -*-theme-d-*-

;; Copyright (C) 2014  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 test235)


  (import (standard-library core)
	  (standard-library math)
	  (standard-library console-io))


  (define main
    (lambda (() <none> nonpure)
      (let ((r 2.5)
	    (r2 0.5))
	(console-display (abs -1.5))
	(console-newline)
	(console-display (square r))
	(console-newline)
	(console-display (- r))
	(console-newline)
	(console-display (sqrt r))
	(console-newline)
	(console-display (expt r 2.0))
	(console-newline)
	(console-display (sin r))
	(console-newline)
	(console-display (cos r))
	(console-newline)
	(console-display (tan r))
	(console-newline)
	(console-display (asin r2))
	(console-newline)
	(console-display (acos r2))
	(console-newline)
	(console-display (atan r2))
	(console-newline)
	(console-display (atan2 r 1.8))
	(console-newline)
	(console-display (exp r))
	(console-newline)
	(console-display (log r))
	(console-newline)
	(console-display (log10 r))
	(console-newline)
	(console-display (sinh r))
	(console-newline)
	(console-display (cosh r))
	(console-newline)
	(console-display (tanh r))
	(console-newline)
	(console-display (asinh r))
	(console-newline)
	(console-display (acosh r))
	(console-newline)))))
	;; (console-display (atanh r))
	;; (console-newline)))))