Ieee1788

Entities

Subprograms

Description

"*"

function "*" (Left, Right : Interval) return Interval

Multiplies two intervals

Parameters
Left

First interval operand

Right

Second interval operand

Return Value

Result based on sign combinations of operands @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.3 "multiplication"

"+"

function "+" (Right : Interval) return Interval

Unary plus operator (identity function)

Parameters
Right

The interval to operate on

Return Value

The same interval unchanged @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.1 "unary plus"

"+"

function "+" (Left, Right : Interval) return Interval

Adds two intervals

Parameters
Left

First interval operand

Right

Second interval operand

Return Value

[Left.Lower + Right.Lower, Left.Upper + Right.Upper] @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.1 "addition"

"-"

function "-" (Right : Interval) return Interval

Unary minus operator (negation)

Parameters
Right

The interval to negate

Return Value

[-Right.Upper, -Right.Lower] @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.2 "negation"

"-"

function "-" (Left, Right : Interval) return Interval

Subtracts two intervals

Parameters
Left

First interval operand

Right

Second interval operand

Return Value

[Left.Lower - Right.Upper, Left.Upper - Right.Lower] @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.2 "subtraction"

"/"

function "/" (Left, Right : Interval) return Interval

Divides two intervals

Parameters
Left

First interval operand

Right

Second interval operand

Return Value

Result based on sign combinations of operands

Raised exceptions
Invalid_Arguments_To_Division

if Right contains zero @see IEEE 1788-2015 Section 8.2 "arithmetic operations" @see IEEE 1788.1-2017 Section 10.8.4 "division"

"<"

function "<" (Left, Right : Interval) return Boolean

Tests if one interval is strictly less than another

Parameters
Left

First interval to compare

Right

Second interval to compare

Return Value

True if Left's upper bound is less than Right's lower bound @see IEEE 1788-2015 Section 7.2 "set relations" @see IEEE 1788.1-2017 Section 10.7.2 "less than"

"<="

function "<=" (Left, Right : Interval) return Boolean

Tests if one interval is less than or equal to another

Parameters
Left

First interval to compare

Right

Second interval to compare

Return Value

True if Left's upper bound <= Right's lower bound @see IEEE 1788-2015 Section 7.2 "set relations" @see IEEE 1788.1-2017 Section 10.7.2 "less than or equal"

"="

function "=" (Left, Right : Interval) return Boolean

Tests if two intervals are equal

Parameters
Left

First interval to compare

Right

Second interval to compare

Return Value

True if both intervals have equal bounds @see IEEE 1788-2015 Section 7.2 "set relations" @see IEEE 1788.1-2017 Section 10.7.1 "equality"

">"

function ">" (Left, Right : Interval) return Boolean

Tests if one interval is greater than another

Parameters
Left

First interval to compare

Right

Second interval to compare

Return Value

True if Left's lower bound is greater than Right's upper bound @see IEEE 1788-2015 Section 7.2 "set relations" @see IEEE 1788.1-2017 Section 10.7.3 "greater than"

">="

function ">=" (Left, Right : Interval) return Boolean

Tests if one interval is greater than or equal to another

Parameters
Left

First interval to compare

Right

Second interval to compare

Return Value

True if Left's lower bound >= Right's upper bound @see IEEE 1788-2015 Section 7.2 "set relations" @see IEEE 1788.1-2017 Section 10.7.3 "greater than or equal"

"abs"

function "abs" (Right : Interval) return Interval

Returns the absolute value of an interval

Parameters
Right

The interval to take the absolute value of

Return Value

Interval containing absolute values of all points in Right @see IEEE 1788-2015 Section 8.3 "absolute value" @see IEEE 1788.1-2017 Section 10.9.1 "absolute value"

Entire

function Entire return Interval

Returns an interval containing all representable values of type T Creates an interval spanning the entire range of type T

Return Value

An interval [T'First,T'Last] representing the complete range @see IEEE 1788-2015 Section 6.3 "interval literals" @see IEEE 1788.1-2017 Section 10.5.1 "entire"

Hull

function Hull (Left, Right : Interval) return Interval

Creates the smallest interval containing two given intervals

Parameters
Left

First interval to include

Right

Second interval to include

Return Value

The smallest interval containing both input intervals @see IEEE 1788-2015 Section 7.3 "convex hull" @see IEEE 1788.1-2017 Section 10.6.2 "hull"

Hull

function Hull (Right : IntervalElements) return Interval

Creates smallest interval containing the union of all input intervals

Parameters
Right

Array of intervals to combine into single interval

Return Value

Smallest interval containing all input intervals

Hull

function Hull (Left, Right : T) return Interval

Creates the smallest interval containing two given values

Parameters
Left

First value to include

Right

Second value to include

Return Value

The smallest interval containing both input values @see IEEE 1788-2015 Section 7.3 "convex hull" @see IEEE 1788.1-2017 Section 10.6.2 "hull"

Hull

function Hull (Right : TElements) return Interval

Computes the smallest interval containing all numbers in the array

Parameters
Right

Array of numbers to enclose in interval

Return Value

Interval [a,b] containing all elements of Right

Max

function Max (Left, Right : T) return T

Returns the maximum of two values

Parameters
Left

First value to compare

Right

Second value to compare

Return Value

The larger of the two input values @see IEEE 1788-2015 Section 8.5 "min/max operations" @see IEEE 1788.1-2017 Section 10.11.2 "maximum"

Min

function Min (Left, Right : T) return T

Returns the minimum of two values

Parameters
Left

First value to compare

Right

Second value to compare

Return Value

The smaller of the two input values @see IEEE 1788-2015 Section 8.5 "min/max operations" @see IEEE 1788.1-2017 Section 10.11.1 "minimum"

Sgn

function Sgn (Right : T) return Sign

Returns the sign of a value

Parameters
Right

The value to determine the sign of

Return Value

-1 for negative, 0 for zero, 1 for positive @see IEEE 1788-2015 Section 8.4 "sign operations" @see IEEE 1788.1-2017 Section 10.10.1 "sign"

To_Interval

function To_Interval (Right : T) return Interval

Creates an interval [x,x] containing a single point

Parameters
Right

The value to be enclosed in the interval

Return Value

A degenerate interval [Right,Right] @see IEEE 1788-2015 Section 6.3 "interval literals" @see IEEE 1788.1-2017 Section 10.5.2 "point intervals"

To_Interval

function To_Interval (Lower_Bound, Upper_Bound : T) return Interval

Creates an interval from explicit bounds

Parameters
Lower_Bound

The lower bound of the interval

Upper_Bound

The upper bound of the interval

Return Value

An interval [Lower_Bound,Upper_Bound] @see IEEE 1788-2015 Section 6.3 "interval literals" @see IEEE 1788.1-2017 Section 10.5.3 "bounded intervals"

To_String

function To_String (Right : Interval) return String

Converts an interval to its string representation

Parameters
Right

The interval to convert

Return Value

A string "[lower,upper]" representing the interval