breakdown

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breakdown

type Breakdown struct {
	Value    float32
	Sign     int
	Exponent int
	Mantissa uint32
	// MantissaSummation is how to compute how the mantissa is used in the calculation.
	// The mantissa is expressed as an integer, but the computation is done via a summation that
	// can be seen in the for loop of the breakdown. This gets the value to be <0.
	MantissaSummation decimal.Decimal
}

func Float32

func Float32(f float32) Breakdown

Float32 breaks down the components of the IEEE 754 float32. https://en.wikipedia.org/wiki/IEEE_754

func (Breakdown) String

func (b Breakdown) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL