yacas
yacas copied to clipboard
Infinite interval is reported of having length 2
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