diff options
author | drh <> | 2023-03-22 16:37:17 +0000 |
---|---|---|
committer | drh <> | 2023-03-22 16:37:17 +0000 |
commit | 5e04d26a3d6861fc2968bd05dbe6f4ec58f43821 (patch) | |
tree | 564cc42493bc33841e13694cceb1ccd6a0e82b0e /src | |
parent | c408c155d7d65f9d00e93d61449fce018d0f242b (diff) | |
download | sqlite-5e04d26a3d6861fc2968bd05dbe6f4ec58f43821.tar.gz sqlite-5e04d26a3d6861fc2968bd05dbe6f4ec58f43821.zip |
For consistency, the ".mode json" output from the CLI now renders infinity
in the same format as the JSON functions.
FossilOrigin-Name: abee339d5eae8b63d9579b7ec3a25f18071e675223e0bb5294c733fb618a3a26
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index b97889f93..340dc13ce 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -2523,9 +2523,9 @@ static int shell_callback( sqlite3_uint64 ur; memcpy(&ur,&r,sizeof(r)); if( ur==0x7ff0000000000000LL ){ - raw_printf(p->out, "1e999"); + raw_printf(p->out, "9.0e+999"); }else if( ur==0xfff0000000000000LL ){ - raw_printf(p->out, "-1e999"); + raw_printf(p->out, "-9.0e+999"); }else{ sqlite3_int64 ir = (sqlite3_int64)r; if( r==(double)ir ){ @@ -2569,9 +2569,9 @@ static int shell_callback( sqlite3_uint64 ur; memcpy(&ur,&r,sizeof(r)); if( ur==0x7ff0000000000000LL ){ - raw_printf(p->out, "1e999"); + raw_printf(p->out, "9.0e+999"); }else if( ur==0xfff0000000000000LL ){ - raw_printf(p->out, "-1e999"); + raw_printf(p->out, "-9.0e+999"); }else{ sqlite3_snprintf(50,z,"%!.20g", r); raw_printf(p->out, "%s", z); |