mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 12:23:31 +01:00
15 lines
253 B
OCaml
15 lines
253 B
OCaml
type t = float
|
|
|
|
let of_float x = x
|
|
let of_int i = float_of_int i
|
|
let of_string s = float_of_string s
|
|
|
|
let to_float x = x
|
|
let to_int x = int_of_float x
|
|
let to_string x =
|
|
if x >= 0. then
|
|
Printf.sprintf "+%f" x
|
|
else
|
|
Printf.sprintf "%f" x
|
|
|