What am I doing wrong here - canFind with iota is not working
Laeeth Isharc via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 26 08:36:37 PST 2015
Thanks.
Rough version for Wiki here:
http://wiki.dlang.org/Floating_Point_Gotchas
It could be tidier, but I am not able to do so at moment. Feel
free to change.
On Thursday, 26 February 2015 at 14:04:17 UTC, John Colvin wrote:
> 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