view run/i/ieee_754_int2flt_G.d @ 1091:9dcac8d4e97f

post DMD-0.163 review
author thomask
date Fri, 21 Jul 2006 11:15:26 +0000
parents 32f8ee5796a1
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

module dstress.run.i.ieee_754_int2flt_G;

int main(){
	size_t border;

	if((ulong.sizeof * 8) < real.dig * 3){
		border = ulong.sizeof * 8;
	}else{
		border = real.dig * 3;
	}

	for(ulong i = 0; i < border; i++){
		ulong test = 1;
		test <<= i;
		real r = test;
		ulong result = cast(ulong)r;

		if(result != test){
			assert(0);
		}
	}

	return 0;
}