to!double different from cast(double)

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 4 00:52:56 PST 2016


On 01/04/2016 12:22 AM, Ali Çehreli wrote:

 >      assert(l != l.to!double);      // passes
 >      assert(l != cast(double)l);    // FAILS

I've realized that I had the -m32 switch on unintentionally. The above 
results are for when -m32 is used. (I am on a 64-bit system.)

Without -m32 both checks fail and the universe makes sense. Still, would 
you consider it a bug that the results are different for -m32?

Ali



More information about the Digitalmars-d-learn mailing list