about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--001help.cc3
-rw-r--r--010vm.cc1
2 files changed, 3 insertions, 1 deletions
diff --git a/001help.cc b/001help.cc
index 351ae27a..8a092ffa 100644
--- a/001help.cc
+++ b/001help.cc
@@ -172,7 +172,8 @@ feenableexcept(FE_OVERFLOW | FE_UNDERFLOW);
 //? assert(sizeof(int) == 4 && sizeof(float) == 4);
 //? //                          | exp   |  mantissa
 //? int smallest_subnormal = 0b00000000000000000000000000000001;
-//? float smallest_subnormal_f = *reinterpret_cast<int*>(&smallest_subnormal);
+//? float smallest_subnormal_f = *reinterpret_cast<float*>(&smallest_subnormal);
+//? cerr << "ε: " << smallest_subnormal_f << '\n';
 //? cerr << "ε/2: " << smallest_subnormal_f/2 << " (underflow)\n";  // test SIGFPE
 :(before "End Includes")
 #include <fenv.h>
diff --git a/010vm.cc b/010vm.cc
index cce19e3d..23d4ef0b 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -662,6 +662,7 @@ ostream& operator<<(ostream& os, no_scientific x) {
     return os;
   }
   ostringstream tmp;
+  tmp.precision(308);  // for 64-bit numbers
   tmp << std::fixed << x.x;
   os << trim_floating_point(tmp.str());
   return os;