Yes, this is a bug in the more general function RegionMeasure
. I knew there were some edge cases in the handling of inexact numerics, but I was unaware of such a simple example. I will forward this bug internally.
Workarounds include using the parametric (2-argument) form of ArcLength
, and using DiscretizeRegion
to pre-process regions before sending them to ArcLength/RegionMeausure
:
In[21]:= ArcLength[DiscretizeRegion@Line[{{0, 0}, {1, 0}, {2.0, 0}}]]
Out[21]= 2.
In[22]:= ArcLength[DiscretizeRegion@Line[{{0}, {1}, {2.0}}]]
Out[22]= 2.
ArcLength[Line[{{0, 0}, {1, 0}, {2.000001, 0}}]]
is back to 2. again... $\endgroup$ – bill s Dec 16 '14 at 3:05RegionMeasure
. TryRegionMeasure[Line[{{0, 0}, {1, 0}, {2., 0}}], 1]
andRegionMeasure[Line[{{0, 0}, {1, 0}, {2, 0}}], 1]
$\endgroup$ – Rolf Mertig Dec 16 '14 at 10:00