opCmp, [partial/total/pre]orders, custom floating point types etc.

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 12 11:06:17 PST 2016


On Tuesday, 12 January 2016 at 18:27:15 UTC, John Colvin wrote:
> P.S. This is not just about floats!

This also affects any custom numeric type which should be 
comparable with float - while working on a checked integer type 
for Phobos, one of the (minor) problems I have run into is that 
it is impossible to reproduce the comparison behaviour of the 
built-in integers with respect to floating-point values - even 
though the latest version of my checked integer type actually has 
no "NaN" state of its own.


More information about the Digitalmars-d mailing list