--
-- bug1:
select cast(cast(1.7976931348623157e+308 as text) as real);     --
1.7976931348623157e+308 is internally formatted&rounded as
1.79769313486232e+308 which >then< is bigger than REAL.max_value so it is
parsed as 'Inf'
-- expected: 1.7976931348623157e+308
-- actual output: Inf
--
-- bug2:
select cast(cast(1.7976931348623157e+311 as text) as real);     --
1.7976931348623157e+311 is internally recognized as Inf, but the
textual-format 'Inf' is not a valid real-format, so it is parsed as '0.0'
-- expected output: Inf
-- actual output: 0.0
--
-- suggested fix1:
-- make textual formatting of real values contain 16 decimal digits instead
of 14
-- suggested fix2:
-- make this regex parse infinity values: ^[+\-]?Inf$
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to