Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'IntervalIntersection' topicStudent Support Forum > General > "IntervalIntersection"

Help | Reply To Topic
Author Comment/Response
Johann Wieser
11/23/04 3:14pm

My problem is a special case of "IntervalIntersection":

My understanding of "Interval[{a,b}]" is the closed Interval: all Real Numbers with a<=x<=b , that means including a and b:

In[4]:=
IntervalMemberQ[Interval[{2, 3}], 2]
IntervalMemberQ[Interval[{2, 3}], 3]

Out[4]=
True

Out[5]=
True

Also Interval[{2, 2}] seems to be an interval:

Out[7]=
Interval[{2, 2}]

In[6]:=
IntervalMemberQ[Interval[{2, 2}], 2]

Out[6]=
True


But now "IntervalIntersection":


In[8]:=
IntervalIntersection[Interval[{2, 3}], Interval[{3, 4}]]

Out[8]=
Interval[]


Why Interval[] (empty set?) and not Interval[{3, 3}] ??


But now the inconsequence:

In[9]:=
IntervalIntersection[Interval[{2, 3.}], Interval[{3, 4}]]

Out[9]=
Interval[{3, 3.}]

In[10]:=
IntervalIntersection[Interval[{2, 3}], Interval[{3., 4}]]

Out[10]=
Interval[{3., 3}]

In[11]:=
IntervalIntersection[Interval[{2, 3.}], Interval[{3., 4}]]

Out[11]=
Interval[{3., 3.}]



What makes different between Integer and Reals in this case?


Johann Wieser


(LicenseID:L4568-4111 , Version: "4.0 for Microsoft Windows (July 16, 1999)" , ReleaseNumber 1)

URL: ,
Help | Reply To Topic