diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-09-14 23:30:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-09-14 23:37:12 -0700 |
commit | 4082acd24f0049604f840fb5e60977e247aafbdf (patch) | |
tree | ee0e15149954af80c20f010c47b2f412961ee199 /039wait.cc | |
parent | e28fa5f1508ef7ffeb0b72406558534928c28f9e (diff) | |
download | mu-4082acd24f0049604f840fb5e60977e247aafbdf.tar.gz |
2199 - stop printing numbers in scientific notation
Turns out the default format for printing floating point numbers is neither 'scientific' nor 'fixed' even though those are the only two options offered. Reading the C++ standard I found out that the default (modulo locale changes) is basically the same as the printf "%g" format. And "%g" is basically the shorter of: a) %f with trailing zeros trimmed b) %e So we'll just do %f and trim trailing zeros.
Diffstat (limited to '039wait.cc')
-rw-r--r-- | 039wait.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/039wait.cc b/039wait.cc index 43efa8cf..9a76e309 100644 --- a/039wait.cc +++ b/039wait.cc @@ -40,7 +40,7 @@ case WAIT_FOR_LOCATION: { Current_routine->state = WAITING; Current_routine->waiting_on_location = loc.value; Current_routine->old_value_of_waiting_location = Memory[loc.value]; - trace(Primitive_recipe_depth, "run") << "waiting for location " << loc.value << " to change from " << Memory[loc.value] << end(); + trace(Primitive_recipe_depth, "run") << "waiting for location " << loc.value << " to change from " << no_scientific(Memory[loc.value]) << end(); break; } |