fixed in 10.1 (windows)
With Mathematica 10.0.2:
ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]]
ArcLength[Line[{{0}, {1}, {2}}]]
(* 2 *)
(* 2 *)
However,
ArcLength[Line[{{0, 0}, {1, 0}, {2.0, 0}}]]
ArcLength[Line[{{0}, {1}, {2.0}}]]
(* 1. *)
(* 1. *)
fixed in 10.1 (windows)
With Mathematica 10.0.2:
ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]]
ArcLength[Line[{{0}, {1}, {2}}]]
(* 2 *)
(* 2 *)
However,
ArcLength[Line[{{0, 0}, {1, 0}, {2.0, 0}}]]
ArcLength[Line[{{0}, {1}, {2.0}}]]
(* 1. *)
(* 1. *)
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.
Line composed of collinear segments and having inexact numbers for coordinates.
– Michael E2
Feb 07 '15 at 18:07
bug fixed in 10.1 (windows)


code
ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]]
ArcLength[Line[{{0}, {1}, {2}}]]
ArcLength[Line[{{0, 0}, {1, 0}, {2.0, 0}}]]
ArcLength[Line[{{0}, {1}, {2.0}}]]
ArcLength[Line[{{0, 0}, {1, 0}, {2.000001, 0}}]]is back to 2. again... – bill s Dec 16 '14 at 03:05RegionMeasure. TryRegionMeasure[Line[{{0, 0}, {1, 0}, {2., 0}}], 1]andRegionMeasure[Line[{{0, 0}, {1, 0}, {2, 0}}], 1]– Rolf Mertig Dec 16 '14 at 10:00