Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Case ¶
type Case struct { ID string Prec int Clamp bool Mode RoundingMode MaxScale int MinScale int Op Op Inputs []Data Output Data Conditions Condition }
func (Case) ShortString ¶
ShortString returns the same as String, except long data values are capped at length digits.
type Condition ¶
type Condition uint32
Condition is a bitmask value raised after or during specific operations.
type Data ¶
type Data string
Data is input or output from a test case.
const NoData Data = "?"
NoData is output when the operation throws some sort of Condition and does not "return" any data.
func (Data) IsInf ¶
IsInf returns a boolean indicating whether the data is an Infinity and an int indicating the signedness of the Infinity.
func (Data) IsNaN ¶
IsNaN returns two booleans indicating whether the data is a NaN value and whether it's signaling or not.
func (Data) TrimQuotes ¶
type Op ¶
type Op uint8
Op is a specific operation the test case must perform.
const ( UnknownOp Op = iota Abs Add And Apply Canonical Class Compare CompareSig CompareTotal CompareTotMag Copy CopyAbs CopyNegate CopySign Divide DivideInt Exp FMA Invert Ln Log10 LogB Max MaxMag Min MinMag Minus Multiply NextMinus NextPlus NextToward Or Plus Power Quantize Reduce Remainder RemainderNear Rescale Rotate SameQuantum ScaleB Shift SquareRoot Subtract ToEng ToIntegral ToIntegralX ToSci Trim Xor )
type RoundingMode ¶
type RoundingMode int
const ( Ceiling RoundingMode = iota Down Floor HalfDown HalfEven HalfUp Up ZeroFiveUp )
func (RoundingMode) String ¶
func (i RoundingMode) String() string
Click to show internal directories.
Click to hide internal directories.