grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
124 stars 24 forks source link

Infinite interval is reported of having length 2 #291

Open MarcoCostantini opened 4 years ago

MarcoCostantini commented 4 years ago

This code produces an infinite interval, which is reported to have length 2.

In> FromString("<OMOBJ><OMA><OMS cd=\"interval1\" name=\"integer_interval\"/><OMI>50</OMI><OMS cd=\"nums1\" name=\"infinity\"/></OMA></OMOBJ> ")OMRead() Out> 50..Infinity In> Length(%) Out> 2

If the extremes of the interval are finite, then the length is correct

In> FromString("<OMOBJ><OMA><OMS cd=\"interval1\" name=\"integer_interval\"/> <OMI>50</OMI> <OMI>55</OMI> </OMA></OMOBJ> ")OMRead() Out> 50..55 In> Length(%) Out> 6