handling T.min the right way

Walter Bright newshound at digitalmars.com
Tue Mar 20 19:14:11 PDT 2007


0ffh wrote:
> Don Clugston wrote:
>> completely different. (For example, I don't know why x++ is legal for 
>> floating point types; I think it's just a newbie trap; you have no 
>> guarantee that x++ is different to x).
> 
> Nope, not at all.
> Standard C defines that after "x++" x is incremented by one, exactly -
> *even for fp types* !

For floating point types, if x happens to be +-infinity then x+1==x.



More information about the Digitalmars-d mailing list