summaryrefslogtreecommitdiff
path: root/lib/std/test/fmt.myr
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2018-03-12 04:24:33 -0400
committerS. Gilles <sgilles@math.umd.edu>2018-03-12 23:43:42 -0400
commit007b768f79b8a45846062086451484a32c1e30fd (patch)
tree03494b0e21bdccf32efef19534abcf31185861fb /lib/std/test/fmt.myr
parent373facebac71ac1e6743d30152543627ad115cf7 (diff)
downloadmc-007b768f79b8a45846062086451484a32c1e30fd.tar.gz
Make fltXYexplode and fltXYassem inverses of each other
The exponent and significand (mantissa) returned from fltXYexplode are the numerical values, not just the bit patterns. Informally, flt64explode(1.23 x 10^101) would return (false, 123000..., 101), where the significand has precisely 52 bits after the intial `1'.
Diffstat (limited to 'lib/std/test/fmt.myr')
-rw-r--r--lib/std/test/fmt.myr1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/test/fmt.myr b/lib/std/test/fmt.myr
index da1b76a..acf499f 100644
--- a/lib/std/test/fmt.myr
+++ b/lib/std/test/fmt.myr
@@ -66,6 +66,7 @@ const builtins = {
check("7b", "{x}", 123)
check("0x7b", "0x{x}", 123)
check("0.0", "{}", 0.0)
+ check("-0.0", "{}", -0.0)
check("0.3", "{}", 0.3)
check("0.3", "{}", (0.3 : flt32))
check("1.0", "{}", 1.0)