]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: use more precision when printing numbers
[ocean] / csrc / oceani.mdc
index 5bf754e8fe52ced6af10691f0519f2c47f2c18fc..180c36fb4d9bb059f30ca0f2b101f6d1b4a1946c 100644 (file)
@@ -1125,7 +1125,7 @@ A separate function encoding these cases will simplify some code later.
                        mpf_t fl;
                        mpf_init2(fl, 20);
                        mpf_set_q(fl, v->num);
-                       gmp_fprintf(f, "%Fg", fl);
+                       gmp_fprintf(f, "%.10Fg", fl);
                        mpf_clear(fl);
                        break;
                        }
@@ -1239,6 +1239,7 @@ executable.
                struct val *v = cast(val, e);
                if (v->vtype == Tstr)
                        printf("\"");
+               // FIXME how to ensure numbers have same precision.
                print_value(v->vtype, &v->val, stdout);
                if (v->vtype == Tstr)
                        printf("\"");