aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2024-03-19 10:16:17 +0000
committerdrh <>2024-03-19 10:16:17 +0000
commit5ed044e8935ac94170253d6686c126a472ef8dd0 (patch)
tree08112e56f4658db2b131e8b5005aa024db8b4f01 /src/sqliteInt.h
parent28cd72ac520883a94cbb8444c38ff42aab485c52 (diff)
downloadsqlite-5ed044e8935ac94170253d6686c126a472ef8dd0.tar.gz
sqlite-5ed044e8935ac94170253d6686c126a472ef8dd0.zip
Fix another problem from [c63e26e705f5e967] involving infinities and the
Kahan-Babushka-Neumaier summation algorithm. Problem reported by [forum:/forumpost/23b8688ef4|forum post 23b8688ef4]. FossilOrigin-Name: 45d272ef38d5ee6189f81369aefb8e3ac35868a67687012d93c84f2bbc42520a
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 8d18bfdfb..db1ede8e6 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -4712,10 +4712,13 @@ void sqlite3MutexWarnOnContention(sqlite3_mutex*);
# define EXP754 (((u64)0x7ff)<<52)
# define MAN754 ((((u64)1)<<52)-1)
# define IsNaN(X) (((X)&EXP754)==EXP754 && ((X)&MAN754)!=0)
+# define IsOvfl(X) (((X)&EXP754)==EXP754)
int sqlite3IsNaN(double);
+ int sqlite3IsOverflow(double);
#else
-# define IsNaN(X) 0
-# define sqlite3IsNaN(X) 0
+# define IsNaN(X) 0
+# define sqlite3IsNaN(X) 0
+# define sqlite3IsOVerflow(X) 0
#endif
/*