mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
15 lines
227 B
OCaml
15 lines
227 B
OCaml
type t = float
|
|
|
|
let of_float x =
|
|
assert ( x >= 0. );
|
|
x
|
|
|
|
external to_float : t -> float = "%identity"
|
|
|
|
let to_string x =
|
|
let f = to_float x in string_of_float f
|
|
|
|
let of_string x =
|
|
let f = float_of_string x in of_float f
|
|
|