MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / AtofNative

Function AtofNative

include/sonic/internal/atof_native.h:1348–1354  ·  view source on GitHub ↗

AtofNative is a slow fallback algorithms.

Source from the content-addressed store, hash-verified

1346
1347// AtofNative is a slow fallback algorithms.
1348static sonic_force_inline double AtofNative(const char *buf, int len) {
1349 Decimal d;
1350 double val = 0;
1351 SetDecimal(&d, buf, len);
1352 DecimalToF64(&d, &val);
1353 return val;
1354}
1355
1356#undef DECIMAL_MAX_DNUM
1357#undef MAX_SHIFT

Callers 2

TestParseDoubleFunction · 0.85

Calls 2

SetDecimalFunction · 0.85
DecimalToF64Function · 0.85

Tested by 1

TestParseDoubleFunction · 0.68