float16

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Num

type Num struct {
	// contains filtered or unexported fields
}

Num represents a half-precision floating point value (float16) stored on 16 bits.

See https://en.wikipedia.org/wiki/Half-precision_floating-point_format for more informations.

func Float16Frombits

func Float16Frombits(bits uint16) Num

Float16frombits returns a new half-precision floating point value from the provided bits.

func New

func New(f float32) Num

New creates a new half-precision floating point value from the provided float32 value.

func (Num) Float32

func (f Num) Float32() float32

func (Num) String

func (f Num) String() string

func (Num) Uint16

func (f Num) Uint16() uint16

Jump to

Keyboard shortcuts

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