Previous Up Next

5.40.1  Defining intervals: i[]

An interval is a range of real numbers, whose end points will be floats with at least 15 significant digits. The interval from a to b is created with i[a,b].
Input:

i[1,13/11]

Output:

[1.00000000000000..1.18181818181819]

If a > b, then i[a,b] returns i[evalf(b,15)-epsilon,evalf(a,15)+epsilon].
Input:

i[pi,sqrt(3)]

Output:

[1.73205080756886..3.14159265358980]

Intervals can also be created by following a decimal number with a question mark. If the decimal number contains n digits, the interval will be centered at a and have width 2· 10n.
Input:

0.123?

Output:

[0.121999999999999..0.124000000000000]

Input:

789.123456?

Output:

[0.789123454999990e3..0.789123456999998e3]

Previous Up Next