package tezos-benchmark

  1. Overview
  2. Docs

Transform multiplications by constants in a costlang expression to fixed point arithmetic. Allows to make cost functions protocol-compatible.

type cast_mode =
  1. | Ceil
  2. | Floor
  3. | Round

Modes of casting of float to int

type options = {
  1. precision : int;
    (*

    Number of bits to consider when decomposing the mantissa

    *)
  2. max_relative_error : float;
    (*

    Percentage of admissible relative error when casting floats to ints

    *)
  3. cast_mode : cast_mode;
  4. inverse_scaling : int;
    (*

    The constant prettification will consider 1/inverse_scaling digits to be not significant.

    *)
  5. resolution : int;
    (*

    Resolution of the grid using when prettifying constants.

    *)
}

Parameters for conversion to fixed point

val default_options : options
val options_encoding : options Tezos_base.TzPervasives.Data_encoding.t
module Apply (P : sig ... end) : Costlang.Transform
OCaml

Innovation. Community. Security.