aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2023-06-26 19:35:20 +0000
committerdrh <>2023-06-26 19:35:20 +0000
commit12b198f1a22796ef224de71e84867d18a1f2bf2a (patch)
treeaaa73a6e0942ffa2e0dd816fc043175fd9ceb6be /src/sqliteInt.h
parentd2b9cdd592e407fd3b086285cc76d6011ed7d7fa (diff)
downloadsqlite-12b198f1a22796ef224de71e84867d18a1f2bf2a.tar.gz
sqlite-12b198f1a22796ef224de71e84867d18a1f2bf2a.zip
Use ideas from T. J. Dekker in "A Floating-Point Technique for Extending the
Available Precision" (1971-07-26) to enhance the accuracy of the SUM() aggregate function in cases where input magnitudes vary wildly. FossilOrigin-Name: 439fc00fee62b4db3751860485e21a99cae4fd1f5d911b2c08651a1466245ecc
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 91b78710c..332048f43 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1234,6 +1234,7 @@ typedef struct Cte Cte;
typedef struct CteUse CteUse;
typedef struct Db Db;
typedef struct DbFixer DbFixer;
+typedef struct DblDbl DblDbl;
typedef struct Schema Schema;
typedef struct Expr Expr;
typedef struct ExprList ExprList;
@@ -5035,6 +5036,15 @@ int sqlite3FixSrcList(DbFixer*, SrcList*);
int sqlite3FixSelect(DbFixer*, Select*);
int sqlite3FixExpr(DbFixer*, Expr*);
int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
+
+
+/* Representation of an extended precision floating point value.
+** The actual value is the sum r and rr. See the dbldbl.c file.
+*/
+void sqlite3DDFromInt(i64,double*);
+void sqlite3DDAdd(double,double,double,double,double*);
+void sqlite3DDSub(double,double,double,double,double*);
+
int sqlite3RealSameAsInt(double,sqlite3_int64);
i64 sqlite3RealToI64(double);
int sqlite3Int64ToText(i64,char*);