shithub: mc

Download patch

ref: 3dfc4831756350a569d234e3a0b1de7b90bc5705
parent: 24cdade7c68fb72245f0aa2fecde4e21306b6549
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Oct 30 20:16:33 EDT 2016

Fix float assembly masks.

--- a/lib/std/fltbits.myr
+++ b/lib/std/fltbits.myr
@@ -69,7 +69,7 @@
 	var s, m, e
 
 	s = (sign : uint64)
-	e = (exp : uint64) & 0x3ff
+	e = (exp : uint64) & 0x7ff
 	m = (mant : uint64) & ((1ul<<52) - 1)
 	-> std.flt64frombits((s << 63) | (e << 52) | m)
 }
@@ -78,7 +78,7 @@
 	var s, m, e
 
 	s = (sign : uint32)
-	e = (exp : uint32) & 0x3ff
+	e = (exp : uint32) & 0xff
 	m = (mant : uint32) & ((1<<22) - 1)
 	-> std.flt32frombits(s << 31 | e << 22 | m)