aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-10-02 11:11:29 +0000
committerdan <Dan Kennedy>2024-10-02 11:11:29 +0000
commit512ad53f3ac8ae97bf83021efd96f96e79750b57 (patch)
tree0ee9e2dd9df3f092d5e0015987e296300fcfb6e7 /src/util.c
parentf9d1141a3b34e36cf26be87dbd199b036985b2d6 (diff)
parent7151010919cff7ab5134173f5d22fdf534104c34 (diff)
downloadsqlite-512ad53f3ac8ae97bf83021efd96f96e79750b57.tar.gz
sqlite-512ad53f3ac8ae97bf83021efd96f96e79750b57.zip
Merge latest trunk changes into this branch.
FossilOrigin-Name: 2b3945e6a597e6853cac567052e92926c8cb6d7a029ac64c2d45c321bbe2e94d
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 0cebb474a..6725306ed 100644
--- a/src/util.c
+++ b/src/util.c
@@ -458,6 +458,7 @@ u8 sqlite3StrIHash(const char *z){
return h;
}
+#if !defined(SQLITE_USE_LONG_DOUBLE) || SQLITE_USE_LONG_DOUBLE+0==0
/* Double-Double multiplication. (x[0],x[1]) *= (y,yy)
**
** Reference:
@@ -493,6 +494,9 @@ static void dekkerMul2(volatile double *x, double y, double yy){
x[1] = c - x[0];
x[1] += cc;
}
+#else
+# define dekkerMul2(A,B,C) /* No-op if SqliteUseLongDouble is always true */
+#endif
/*
** The string z[] is an text representation of a real number.
@@ -652,7 +656,7 @@ do_atof_calc:
if( e==0 ){
*pResult = s;
- }else if( sqlite3Config.bUseLongDouble ){
+ }else if( SqliteUseLongDouble ){
LONGDOUBLE_TYPE r = (LONGDOUBLE_TYPE)s;
if( e>0 ){
while( e>=100 ){ e-=100; r *= 1.0e+100L; }
@@ -1063,7 +1067,7 @@ void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){
/* Multiply r by powers of ten until it lands somewhere in between
** 1.0e+19 and 1.0e+17.
*/
- if( sqlite3Config.bUseLongDouble ){
+ if( SqliteUseLongDouble ){
LONGDOUBLE_TYPE rr = r;
if( rr>=1.0e+19 ){
while( rr>=1.0e+119L ){ exp+=100; rr *= 1.0e-100L; }