summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--double-error.c2
-rw-r--r--ratio.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/double-error.c b/double-error.c
index 591a820..06d27ae 100644
--- a/double-error.c
+++ b/double-error.c
@@ -22,7 +22,7 @@ double_error to_exptype(double d){
}
bool to_string(char* s, double_error de){
- sprintf(s,"%f +/- %.16f",de.v,de.e);
+ sprintf(s,"%f +/- %6.1e",de.v,de.e);
return true;
}
diff --git a/ratio.c b/ratio.c
index 243426d..07a28ce 100644
--- a/ratio.c
+++ b/ratio.c
@@ -129,6 +129,6 @@ double to_double(rational r){
bool to_string(char* s,rational r){
double f = to_double(r);
- sprintf(s,"%llu / %llu = %f +- %.24f",r.n,r.d,f,f*DBL_EPSILON);
+ sprintf(s,"%llu / %llu = %f +/- %6.1e",r.n,r.d,f,f*DBL_EPSILON);
return true;
}