iota with custom boundary conditions
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Tue Nov 13 06:20:35 PST 2012
On 11/13/2012 03:08 PM, bearophile wrote:
> In general is it a good idea to use iota with floating point arguments?
I guess you're thinking of the difficulty of making exact equality comparisons
between the current value and the end value? A floating-point iota certainly
allows you to represent certain things quite elegantly, although I suppose for
safety's sake you might want to use an integer-based iota and calculate FP
values from that.
In any case, the usefulness of closed-vs-open boundary conditions isn't limited
to FP iota, although it's certainly the main use case.
More information about the Digitalmars-d
mailing list