summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-02-05 13:40:23 +0100
committerTyge Løvset <[email protected]>2021-02-05 13:40:23 +0100
commitc0f80d42f0b8070420fd0f3b81d76007d97cee12 (patch)
tree519d323684f99db5f16de1659fca6eac79f43222 /examples
parentdff0972dd98a2a8c46a7bd0bf1308ae06dc670f5 (diff)
downloadSTC-modified-c0f80d42f0b8070420fd0f3b81d76007d97cee12.tar.gz
STC-modified-c0f80d42f0b8070420fd0f3b81d76007d97cee12.zip
Upgraded cstr impl.
Diffstat (limited to 'examples')
-rw-r--r--examples/words.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/words.c b/examples/words.c
index 08563cfc..b3bd963f 100644
--- a/examples/words.c
+++ b/examples/words.c
@@ -1,4 +1,4 @@
-
+#include <math.h>
#include <stc/cstr.h>
#include <stc/cmap.h>
#include <stc/clist.h>
@@ -16,7 +16,7 @@ int main1()
"this", "sentence", "is", "a", "hoax"
});
- clist_str_push_back(&lwords, cstr_from_fmt("%f", 123897.0 / 23.0));
+ clist_str_push_back(&lwords, cstr_from_fmt("%.15f", sqrt(2)));
c_foreach (w, clist_str, lwords)
printf("%s\n", w.ref->str);
puts("");