projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
src
/
scheme
/
ao_scheme_float.c
diff --git
a/src/scheme/ao_scheme_float.c
b/src/scheme/ao_scheme_float.c
index 541f02644f37f51043210968fe82585325e3e8c3..99249030b56c7a15c775d1e12becb5ec5542964d 100644
(file)
--- a/
src/scheme/ao_scheme_float.c
+++ b/
src/scheme/ao_scheme_float.c
@@
-39,6
+39,10
@@
const struct ao_scheme_type ao_scheme_float_type = {
.name = "float",
};
+#ifndef FLOAT_FORMAT
+#define FLOAT_FORMAT "%g"
+#endif
+
void
ao_scheme_float_write(ao_poly p)
{
@@
-54,7
+58,7
@@
ao_scheme_float_write(ao_poly p)
printf("+");
printf("inf.0");
} else
- printf (
"%g", f->value
);
+ printf (
FLOAT_FORMAT, v
);
}
float