SQLite Forum

IEEE 754 infinities in quote()

IEEE 754 infinities in quote()

(1) By anonymous on 2024-02-26 19:48:24 [source]


Currently, SQL function quote() outputs 'Inf' for IEEE 754 infinity, whereas CLI .dump produces '1e999'. Looking at sqlite3QuoteValue() in src/func.c, the format strings "%!.15g" and "%!.20e" could be modified to "%!0.15g" and "%!0.20e" respectively and make use of special-value handling in printf() to produce a similar result without altering float formatting otherwise. I might be wrong.