CAST of Infinity values to FLOAT doesn't work
---------------------------------------------

                 Key: CORE-6521
                 URL: http://tracker.firebirdsql.org/browse/CORE-6521
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.7
            Reporter: Lukas Eder


According to the docs:
https://firebirdsql.org/refdocs/langrefupd25-intfunc-log.html

This is how NaN, +Infinity, and -Infinity values of type DOUBLE PRECISION are 
created:

    select log(1, 1), log(1, 0.5), log(1, 1.5) from RDB$DATABASE

It's possible to get a NaN value of type FLOAT:

    select cast(log(1, 1) as float) from RDB$DATABASE

But infinities cannot be cast to FLOAT:

    select cast(log(1, 1.5) as float) from RDB$DATABASE

This is producing an error:

> SQL Error [335544916] [22003]: arithmetic exception, numeric overflow, or 
> string truncation; numeric value is out of range [SQLState:22003, ISC error 
> code:335544916]

See also this Stack Overflow question:
https://stackoverflow.com/q/66763171/521799

-- 
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

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to