Code Samples

CODE EXAMPLE 1-1 Hello Interval World 1-6

CODE EXAMPLE 1-2 Hello Interval World With interval Variables 1-7

CODE EXAMPLE 1-3 Interval Input/Output 1-9

CODE EXAMPLE 1-4 [inf, sup] Interval Output 1-11

CODE EXAMPLE 1-5 Single-Number Output 1-12

CODE EXAMPLE 1-6 Character Input With Internal Data Conversion 1-14

CODE EXAMPLE 1-7 Simple interval Expression Example 1-15

CODE EXAMPLE 1-8 interval-Specific Functions 1-16

CODE EXAMPLE 1-9 interval Versions of Mathematical Functions 1-17

CODE EXAMPLE 2-1 Valid and Invalid interval External Representations 2-3

CODE EXAMPLE 2-2 Efficient Use of the String-to-Interval Constructor 2-4

CODE EXAMPLE 2-3 interval Constructor With Floating-Point Arguments 2-7

CODE EXAMPLE 2-4 Using the interval_hull Function With Interval Constructor 2-8

CODE EXAMPLE 2-5 interval Conversion 2-9

CODE EXAMPLE 2-6 Creating a Narrow Interval That Contains a Given Real Number 2-10

CODE EXAMPLE 2-7 interval(NaN) 2-11

CODE EXAMPLE 2-8 Set Operators 2-20

CODE EXAMPLE 2-9 Set-Equality Test 2-27

CODE EXAMPLE 2-10 Interval Relational Functions 2-27

CODE EXAMPLE 2-11 Single-Number Output Examples 2-34

CODE EXAMPLE 2-12 Single-Number [inf, sup]-Style Output 2-36

CODE EXAMPLE 2-13 ndigits 2-37

CODE EXAMPLE 2-14 atan2 Indeterminate Forms 2-39

CODE EXAMPLE 2-15 Example of Using an Interval Type as a Template Argument for STL Classes 2-47

CODE EXAMPLE 2-16 >> Incorrectly Interpreted as the Right Shift Operator 2-48

CODE EXAMPLE 2-17 Example of Using the nvector Class 2-50

CODE EXAMPLE 2-18 Example of Using the nmatrix Class 2-51