floating point verification using is?
bearophile
bearophileHUGS at lycos.com
Fri Dec 18 11:50:02 PST 2009
Steven Schveighoffer:
> to me, is means "ignore semantic meaning, do a bitwise compare" regardless
> of reference status.
>
> For example comparing 2 array structs using == will check that all the
> data is the same, but using "is" makes it compare bitwise the structs
> directly.
>
> I see no difference with floating points, except you can't get at the bits
> easily. The existence of isIdentical could be completely replaced by one
> or two instructions generated by the compiler when it sees "float is
> float".
You can try expressing this idea in the main D group.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list