package tezos-benchmark

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_benchmark.Fixed_point_transformSource

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

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

Modes of casting of float to int

Sourcetype 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

Sourceval default_options : options
Sourcemodule Apply (P : sig ... end) : Costlang.Transform
OCaml

Innovation. Community. Security.