File: testcr.ml

package info (click to toggle)
ocamlcreal 0.7-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 368 kB
  • ctags: 754
  • sloc: ml: 2,699; ansic: 1,067; sh: 113; makefile: 46
file content (17 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (5)
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)