avl._core.float module

class avl._core.float.Fp16(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>)[source]
__init__(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>) None[source]

Initialize an instance of the class.

Parameters:
  • value (int) – The value to be assigned to the instance.

  • auto_random (bool, optional) – Flag to enable automatic randomization, defaults to True.

  • fmt (function, optional) – The format to be used, defaults to hex.

to_bits() int[source]

Get the raw representation of the variable.

Returns:

The raw value.

Return type:

float

from_bits(raw: int) None[source]

Convert the raw representation back to a float.

Parameters:

raw (int) – The raw value.

class avl._core.float.Fp32(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>)[source]
__init__(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>) None[source]

Initialize an instance of the class.

Parameters:
  • value (int) – The value to be assigned to the instance.

  • auto_random (bool, optional) – Flag to enable automatic randomization, defaults to True.

  • fmt (function, optional) – The format to be used, defaults to hex.

class avl._core.float.Fp64(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>)[source]
__init__(*args, auto_random: bool = True, fmt: ~collections.abc.Callable[[...], str] = <class 'str'>) None[source]

Initialize an instance of the class.

Parameters:
  • value (int) – The value to be assigned to the instance.

  • auto_random (bool, optional) – Flag to enable automatic randomization, defaults to True.

  • fmt (function, optional) – The format to be used, defaults to hex.

avl._core.float.Half

alias of Fp16

avl._core.float.Float

alias of Fp32

avl._core.float.Double

alias of Fp64