File tree Expand file tree Collapse file tree 2 files changed +175
-151
lines changed
Expand file tree Collapse file tree 2 files changed +175
-151
lines changed Original file line number Diff line number Diff line change 11/*
22 Code from https://github.com/jk-jeon/dragonbox
3+
4+ This is the dragonbox algorithm author's code.
5+ But the output is always in scientific notation.
36 */
4- #include < stdio.h>
57#include " dragonbox/dragonbox_to_chars.h"
6-
78extern " C" {
8-
9- char *dtoa_dragonbox (double val, char *buf) {
9+ char *dtoa_dragonbox_jk (double val, char *buf) {
1010 return jkj::dragonbox::to_chars (val, buf); // null-terminate
1111 // return jkj::dragonbox::to_chars_n(val, buf); // no null-terminate
1212}
13+ }
14+
15+
1316
17+ /*
18+ Code from https://github.com/abolz/Drachennest
19+ */
20+ #include " dragonbox.h"
21+ extern " C" {
22+ char *dtoa_dragonbox (double val, char *buf) {
23+ buf = dragonbox::Dtoa (buf, val); // need 64 bytes
24+ *buf = ' \0 ' ;
25+ return buf;
26+ }
1427}
You can’t perform that action at this time.
0 commit comments