module Utils:sig
..end
Various utility functions.
val pp_list : sep:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter -> 'a list -> unit
val pp_array : sep:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter -> 'a array -> unit
val pp_matrix : begl:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
endl:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
sepl:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
sepc:(unit, Stdlib.Format.formatter, unit) Stdlib.format ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter -> 'a array array -> unit
val itv_float_of_q : Q.t -> float * float
itv_float_of_q q
returns two floats l, u
such that, when q is
Q.undef
, l
and u
are both nan
, otherwise l <= q <= u and
there is no float (either normal or subnormal) such that l < f < u.
val float_of_q : Q.t -> float
float_of_q q
returns a float closest to q
.
val setround_tonearest : unit -> unit
val profile : (unit -> 'a) -> 'a * float
profile f
executes the function f
and returns both its result
and the execution time in second.
val map : ('a -> 'b) -> 'a list -> 'b list
tail-recursive version of List.map
(implemented using
List.rev_map and List.rev)