std.range.iota enhancement: supporting more types (AKA issue 10762)

Jakob Ovrum jakobovrum at gmail.com
Sat Dec 28 05:43:23 PST 2013


On Tuesday, 24 December 2013 at 15:41:06 UTC, H. S. Teoh wrote:
> This code is wrong for iota(1.0, 9.5), because .back must be of 
> the form
> start + n*step for some integer n, but in this case end is not 
> an
> integral multiple of step away from start. (It's not only wrong 
> for
> .back, it also won't terminate because start==end will never 
> hold.)

It is a simplified example. It has no pretence of handling 
floating point.


More information about the Digitalmars-d mailing list