What am I doing wrong here - canFind with iota is not working

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 06:04:16 PST 2015


On Thursday, 26 February 2015 at 12:39:20 UTC, Laeeth Isharc 
wrote:
> Hi John.
>
> Tks help with ldc - will look at that shortly.
>
> So Kingsly needs to use a predicate for canFind that returns 
> true if the two values being compared are close enough to being 
> the same given floating point quirks ?
>
> Ie I think people diagnosed the problem, but what is the 
> solution...

My preference would be to find a way to construct the program 
such that it isn't needed.

Failing that, std.math has feqrl and approxEqual for this task.


More information about the Digitalmars-d mailing list