aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/float_int_ops_on_bits.zc
blob: 38a45a8cebae1bb705e2a32e85e3b7f6fd9cc5c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// expect: 1/1/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
	float f = 1.0;
	int bits = f as int;
	word r = f & 4607182418800017408;
	word r2 = f | 0;
	pn(r == bits);
	pn(r2 == bits);
	return 0;
}