Conversion from zero numeric literals to DECFLOAT results in incorrect value ----------------------------------------------------------------------------
Key: CORE-5696 URL: http://tracker.firebirdsql.org/browse/CORE-5696 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 4.0 Alpha 1 Environment: Firebird-4.0.0.840-0_x64 (on Windows 10 x64) Reporter: Mark Rotteveel Zero numeric literals do not correctly convert to DECFLOAT (test with inserting a value into a DECFLOAT(16) column). literal => resulting decfloat value || expected decfloat value -0 => 0 || -0 -0E300 => -0E-16 || -0E+300 -0E+300 => -0E-16 || -0E+300 -0.0E+300 => -0E-16 || -0E+300 0E300 => -0E-16 || 0E+300 0E+300 => -0E-16 || 0E+300 Using the equivalent string and casting that to DECFLOAT (decfloat(16) in my tests) does result in the correct value. However conversion from string to decfloat also has its problems: '0.0E300' => 0E299 || 0E300 (or 0.0E300) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel