slvm

Module float

Source
Expand description

This module controls access to two different floating point implementations (F56 and F32Wrap). F32Wrap is implemented in this file, and F56 is implemented in its own file. The purpose of this module is to allow the Value module to switch between the two implementations

Modulesยง

  • float_32 ๐Ÿ”’
  • float_56 ๐Ÿ”’
    This module contains F56, a 7-byte struct that represents a 56-bit floating point number. The SLVM uses 8-byte Values but the first byte stores the type of the Value so 7 bytes remain for the float. Check out value.rs to see how the F56 is one of the enum variants of the Value struct.

Structsยง

  • The F56 struct represents a 56-bit floating point number using 7 bytes. Most operations on F56 are done by converting to f64, performing the operation, and then converting back to F56