File: testcr.ml

package info (click to toggle)
ocamlcreal 0.7-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 384 kB
  • ctags: 751
  • sloc: ml: 2,699; ansic: 1,067; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

open Cr
open Cr.Infixes

let x = of_int 1
let y = of_int 7
let r = sin (sin (sin one))

(* "exp(-pi) = exp(-pi/2) * exp(-pi/2)"
	  (exp (neg pi)) (let y = exp (neg half_pi) in y *! y)
*)

let r = mul (of_int 4) (arctan one)

let () = Format.printf "%F@." (to_float r 50)
let () = print_endline (to_string ~radix:10 r 100)