state

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause, MIT Imports: 1 Imported by: 0

Documentation

Overview

Package state provides custom type to encode state and error codes for uint128 and dec128 packages.

Index

Constants

View Source
const (
	Default = State(0)
	Neg     = State(1)

	Error = State(2)

	NaN                    = State(3)
	DivisionByZero         = State(4)
	Overflow               = State(5)
	Underflow              = State(6)
	NegativeInUnsignedOp   = State(7)
	NotEnoughBytes         = State(8)
	InvalidFormat          = State(9)
	PrecisionOutOfRange    = State(10)
	RescaleToLessPrecision = State(11)
	SqrtNegative           = State(12)
)

State codes are hard-coded for binary compatibility.

Variables

View Source
var OK = Default

Functions

This section is empty.

Types

type State

type State uint8

func (State) Error

func (s State) Error() error

func (State) IsError

func (s State) IsError() bool

func (State) IsOK

func (s State) IsOK() bool

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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