1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Begin cutting over sqlite3FpDecode() into printf(). The code in this

check-in gets a lot right, but there are still some formatting
discrepencies.

FossilOrigin-Name: c134d423e79ba5d3343d7480229822a0c83210f67f12129e0237181f892f97a5
This commit is contained in:
drh
2023-06-30 23:18:44 +00:00
parent 002330dc48
commit aebeabacff
4 changed files with 54 additions and 159 deletions

View File

@@ -949,6 +949,8 @@ void sqlite3FpDecode(FpDecode *p, double r, int iRound){
p->n = 1;
p->iDP = 1;
p->z[0] = '0';
p->isNan = 0;
p->isInf = 0;
return;
}else{
p->sign = '+';
@@ -973,6 +975,8 @@ void sqlite3FpDecode(FpDecode *p, double r, int iRound){
p->iDP = 3;
return;
}
p->isNan = p->isInf = 0;
/* At this point, r is positive (non-zero) and is not Inf or NaN.
** The strategy is to multiple or divide r by powers of 10 until
** it is in between 1.0e+17 and 1.0e+19. Then convert r into