Re: double.init is real.nan, is it a bug?

2013-08-14 Thread bsd
On Thursday, 15 August 2013 at 05:12:35 UTC, Jonathan M Davis wrote: On Thursday, August 15, 2013 06:01:21 bsd wrote: Hi all, There are multiple values for NaN. It's still a bit surprising to me that assert(val is double.nan) failed, but as long as val is still one of the values fo

double.init is real.nan, is it a bug?

2013-08-14 Thread bsd
Hi all, I think this is a bug, but if not I'm very confused and would like some clarification. When checking double values that could be nan or unassigned I have to check both double.init and double.nan. But double.init IS double.nan. --- void main() { // passes but I believe it is ch

Re: Auto keyword with const variable

2013-07-24 Thread bsd
On Wednesday, 24 July 2013 at 11:26:32 UTC, Mike Parker wrote: ... This is the exact behavior I would expect. I think of auto as "this variable is going to be the same type as that variable." Since in is const int, then j also is going to be const int. If you want to copy n into a nonconst vari