On Mar 24, 2012, at 5:26 PM, Damian Conway <dam...@conway.org> wrote:
>> Actually, that one works fine in both niecza and rakudo, since those are >> Rats. > > Oh, that's good to hear. > > It doesn't change my underlying argument however. Any operations > performed on genuine floats are going to lose precision, and if we're > using such operations to infer relationships (such as equality or > sequence) then we ought to take the loss of precision we're causing > into account when deciding outcomes. > > Which seems to mean either (a) making it a compiletime error to request > sequence inferences on floats , or (b) comparing the differences and > quotients within the sequence inference with a larger epsilon (or using > interval arithmetic). > > Damian IMHO: if we're going to take loss of precision into account, we should do so explicitly. I'm a bit rusty, so forgive me if I misuse the terminology: if a number has an epsilon, the epsilon should be attached to it as a trait so that it can be accessed by the program. This allows all sorts of things, like "close enough" smart-matching and error propagation. The main question is if Perl should assign a minimum epsilon to all floats by default, or if this should be an "all's fair if you predeclare" type of thing.