<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="11" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"></View-Properties>
<MapleNet-Properties warnlevel="3" longdelim="true" plotoptions="" echo="1" errorcursor="false" elisiontermsthreshold="10000" elisiontermsbefore="100" errorbreak="1" prettyprint="3" prompt="&gt; " latexwidth="6.0" useclientjvm="true" ansi="false" screenheight="25" labelwidth="20" plotdevice="inline" typesetting="standard" displayprecision="-1" indentamount="4" elisiondigitsthreshold="10000" quiet="false" plotoutput="terminal" rtablesize="10" preplot="" showassumed="1" plotdriver="openviz" elisiontermsafter="100" labelling="true" postplot="" screenwidth="79" elisiondigitsbefore="100" elisiondigitsafter="100" verboseproc="1" imaginaryunit="I" ShowLabels="true"/>
<Styles><Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle262" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle257" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="_pstyle258" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle259" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle256" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle261" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle260" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle262" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle257" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle258" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="_pstyle259" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle256" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle261" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle260" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/>
<Task-table>
<Task-category name="&lt;default&gt;">
</Task-category>
</Task-table>
<Annotation-table>
<Annotation-category name="&lt;default&gt;">
</Annotation-category>
</Annotation-table>
<Task>
</Task>
<Group labelreference="L3">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart;</Text-field>
</Input>
</Group>
<Group labelreference="L29" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
<Input>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"><Font bold="true" size="14">intCompare v1.0 - Comparison Operators for Interval Arithmetic in Maple </Font>
intCompare provides the four comparison operators &lt;,&lt;=, &gt;=, &gt; for intervals. In case of a Don't know</Text-field>
<Text-field style="Normal" layout="Normal">we return FAIL.
###########################################################################
Module header
###########################################################################
</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">intCompare:=module()
export Interval_Compare, Interval_LT, `&amp;&lt;`, Interval_LE, `&amp;&lt;=`,
Interval_GT, `&amp;&gt;`, Interval_GE, `&amp;&gt;=`, Interval_abs, `&amp;abs`,
Interval_Normalize, Interval_IsBorder;
option package;
description &quot;Comparison Operators for Interval Arithmetic in Maple&quot;;
#uses intpakX; <Font style="Normal">
</Font></Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal">Name definitions (see below for body of corresponding procedures)</Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################
</Text-field>
<Text-field prompt="&gt; " style="Normal" layout="Normal"><Font style="Maple Input">`&amp;abs`:=Interval_abs;
`&amp;&lt;`:=Interval_LT;
`&amp;&lt;=`:=Interval_LE;
`&amp;&gt;`:=Interval_GT;
`&amp;&gt;=`:=Interval_GE;
</Font></Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> PROCEDURE -Interval_abs</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">This procedure computes the absolute value of an interval or number or symbol
</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_abs:=proc(x)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if x = [] then x</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif type(x,interval) then</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if x[1] = FAIL or x[2] = FAIL then FAIL</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif x[1] = x[2] then [abs(x[1]), abs(x[2])]</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif is_in(0, x) then [0, max(abs(x[1]), x[2])]</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif x[1] &gt; 0 then x</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else [abs(x[2]), abs(x[1])]</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif type(x, numeric) or type(x, constant) then abs(x)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else 'Interval_abs(x)'</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">end:</Text-field>
<Text-field style="Normal" layout="Normal">
</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> PROCEDURE -Interval_Normalize</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">This procedure takes some argument, and in case of an interval it normalizes a collapsing interval [a, a] to a.
</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_Normalize:=proc(x)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if type(x,interval) and (not x = []) and x[1] = x[2] then</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> x[1];</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else x;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">end:</Text-field>
<Text-field style="Normal" layout="Normal">
</Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> PROCEDURE -Interval_IsBorder</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">This procedure checks if the first argument is the border of the second argument.
To be a border means for intervals to be one of the edge-points, in case a non-collapsing interval is given as border-candidate
we return FAIL.
</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_IsBorder:=proc(b,i)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">local x, y;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> x := Interval_Normalize(b);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> y := Interval_Normalize(i);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if x=[] then false</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif y=[] then false</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif type(x,interval) then undefined</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif type(y,interval) and (x = y[1] or x = y[2]) then true</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif x = y then true</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else false;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">end:</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> PROCEDURE -Interval_Compare</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">This procedure takes three parameters. The first parameter is a comparison-operator, &lt;, &lt;=, &gt;, &gt;= and</Text-field>
<Text-field style="Normal" layout="Normal">the second and third is a symbol, number or interval.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_Compare:=proc(c,x,y)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">local p,q,i,ib,symnum;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">description &quot;Generic comparison function for intervals&quot;;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> ib := Interval_IsBorder;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> symnum :=proc(a) type(a, symbol) or type(a, numeric) end;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # check for intersection</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> i := Interval_Normalize(Interval_intersect(x,y));</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if symnum(x) and symnum(y) then c(x,y)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> elif i = [] or (not type(i, interval) and ib(i, x) and ib(i,y)) then</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if type(x,interval) then</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # check for empty intervals</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if x = [] then RETURN(undefined); fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # compute the relevant border for x</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if c(x[1], x[2]) then p := x[2]; else p:=x[1] fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else p := x;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if type(y,interval) then</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # check for empty intervals</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if y = [] then RETURN(undefined); fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # compute the relevant border for y</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if c(y[1], y[2]) then q := y[1]; else q:=y[2] fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else q := y;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> # now compute the result of the comparison</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> if type(p, num_or_FAIL) and type(q, num_or_FAIL) then c(p, q)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else 'Interval_Compare(c, p, q)'</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> else RETURN(undefined);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"> fi;</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">end:</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> PROCEDURES -Interval_&lt;R&gt;, just instances of the general Interval_Compare procedure</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_LT:=proc(x,y) Interval_Compare(`&lt;`,x,y) end proc:</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_LE:=proc(x,y) Interval_Compare(`&lt;=`,x,y) end proc:</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_GT:=proc(x,y) Interval_Compare(`&gt;`,x,y) end proc:</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Interval_GE:=proc(x,y) Interval_Compare(`&gt;=`,x,y) end proc:</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">
<Font style="Normal">-----------------------------------------------------------------------------</Font></Text-field>
<Text-field style="Normal" layout="Normal"> KNOWN PROBLEMS</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">1. As the interval-package don't support symbolic intervals, e.g. construct(Pi) = [3.141592653, 3.141592655]</Text-field>
<Text-field style="Text" layout="Normal"> The interval compare method fails on e.g.</Text-field>
<Text-field style="Text" layout="Normal">&gt; Interval_Compare(`&lt;`, Pi, Pi); </Text-field>
<Text-field style="Text" layout="Normal"> FAIL</Text-field>
<Text-field style="Text" layout="Normal"> Because the intersection-check yields an non-empty result:</Text-field>
<Text-field style="Text" layout="Normal">&gt; Interval_intersect( Pi, Pi); </Text-field>
<Text-field style="Text" layout="Normal"> [3.141592653, 3.141592655]</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">-----------------------------------------------------------------------------</Text-field>
<Text-field style="Normal" layout="Normal"> TEST-CASES</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">data:</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">i1 := 1;</Text-field>
<Text-field style="Normal" layout="Normal">i2 := 1.;</Text-field>
<Text-field style="Normal" layout="Normal">i3 := 3;</Text-field>
<Text-field style="Normal" layout="Normal">i4 := Pi;</Text-field>
<Text-field style="Normal" layout="Normal">i5 := [1., 1.1];</Text-field>
<Text-field style="Normal" layout="Normal">i6 := [3., 3.1];</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">checks:</Text-field>
<Text-field style="Text" layout="Normal">i4 &amp;&gt; i6;</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">end module:</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">end package intCompare</Text-field>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal">Disclaimer:</Text-field>
<Text-field style="_pstyle256" layout="_pstyle256">While every effort has been made to validate the solutions in this package,</Text-field>
<Text-field style="_pstyle257" layout="_pstyle257">Waterloo Maple Inc. and the contributors are not responsible for any errors</Text-field>
<Text-field style="_pstyle258" layout="_pstyle258">contained and are not liable for any damages resulting from the use of this</Text-field>
<Text-field style="_pstyle259" layout="_pstyle259">material.</Text-field>
<Text-field style="_pstyle259" layout="_pstyle259"></Text-field>
</Input>
</Group>
<Group labelreference="L20" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"><Equation executable="true" style="2D Input" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUkjbWlHRiQ2I1EhRicvJStleGVjdXRhYmxlR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRic=">JSFH</Equation></Text-field>
</Input>
</Group>
<Group labelreference="L15" drawlabel="true">
<Input>
<Text-field style="Normal" layout="Normal">###########################################################################</Text-field>
<Text-field style="Normal" layout="Normal">Installation:</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">* execute this:</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">libname:=&quot;/home/ewaryst/data/Maple/lib&quot;, libname;</Text-field>
</Input>
</Group>
<Group labelreference="L24" drawlabel="true">
<Input>
<Text-field style="Normal" layout="Normal">* load the int-lib</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(intpakX);</Text-field>
</Input>
</Group>
<Group labelreference="L26" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">* go to the module-definition and hit Enter</Text-field>
</Input>
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L24" drawlabel="true">
<Input>
<Text-field style="Normal" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L23" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">* Execute the savelib-command</Text-field>
</Input>
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">savelib('intCompare');</Text-field>
</Input>
</Group>
<Group labelreference="L15" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">You're done!</Text-field>
</Input>
</Group>
<Group labelreference="L19" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"><Equation executable="true" style="2D Input" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUkjbWlHRiQ2I1EhRicvJStleGVjdXRhYmxlR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRic=">JSFH</Equation></Text-field>
</Input>
</Group>
<Group labelreference="L27" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"><Equation executable="true" style="2D Input" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUkjbWlHRiQ2I1EhRicvJStleGVjdXRhYmxlR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRic=">JSFH</Equation></Text-field>
</Input>
</Group>
</Worksheet>