diff options
author | drh <> | 2023-06-30 18:35:43 +0000 |
---|---|---|
committer | drh <> | 2023-06-30 18:35:43 +0000 |
commit | a1b0ff173520fc73a182e57b06b1d0228b343711 (patch) | |
tree | 5f2283b7e1e6d2e93076869fcdd955104256862c /src/sqliteInt.h | |
parent | 24b368da8dac15cb7d3997ae4fa27d76f0fc682a (diff) | |
download | sqlite-a1b0ff173520fc73a182e57b06b1d0228b343711.tar.gz sqlite-a1b0ff173520fc73a182e57b06b1d0228b343711.zip |
Experiments with a new algorithm for converting ieee-754 binary64 numbers
into decimal.
FossilOrigin-Name: e923405e448385085224f9289991b303d86b02763535ea77d6fcee98ba6fc1f2
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index d7a2d90fc..b4705b5e2 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1239,6 +1239,7 @@ typedef struct Schema Schema; typedef struct Expr Expr; typedef struct ExprList ExprList; typedef struct FKey FKey; +typedef struct FpDecode FpDecode; typedef struct FuncDestructor FuncDestructor; typedef struct FuncDef FuncDef; typedef struct FuncDefHash FuncDefHash; @@ -4597,6 +4598,20 @@ struct PrintfArguments { sqlite3_value **apArg; /* The argument values */ }; +/* +** An instance of this object receives the decoding of a floating point +** value into an approximate decimal representation. +*/ +struct FpDecode { + char sign; /* '+' or '-' */ + char isNan; /* True if not-a-number */ + char isInf; /* True if infinity */ + int n; /* Significant digits in the decode */ + int iDP; /* Location of the decimal point */ + char z[24]; /* Significiant digits */ +}; + +void sqlite3FpDecode(FpDecode*,double); char *sqlite3MPrintf(sqlite3*,const char*, ...); char *sqlite3VMPrintf(sqlite3*,const char*, va_list); #if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE) |