Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in trigonometric functions can produce NaN and Infinity [CORE2505] #2917

Closed
firebird-issue-importer opened this issue Jun 11, 2009 · 8 comments

Comments

@firebird-issue-importer

Submitted by: Claudio Valderrama C. (robocop)

Assigned to: Claudio Valderrama C. (robocop)

Is related to QA404

According to the SQL standard, floating point values that aren't regular values should be considered errors. The engine shouldn't produce NaN or Infinity:

SQL> select asin(2), cot(0) from rdb$database;

               ASIN                     COT

======================= =======================
NaN Infinity

SQL> select acos(2) - acos(2) from rdb$database;

           SUBTRACT

=======================
NaN

We have two options: detect the problem once it has occurred (and give a generic message) or check the parameters. Since we know the functions we offer, the latter seems feasible.

Commits: 4cd4c52 82d2c63

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 14, 2009

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 14, 2009

Commented by: Claudio Valderrama C. (robocop)

ASIN, ACOS and COT should validate its argument, EXP should validate its result, LOG10 should check the input like LN does and POWER should validate its result.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 17, 2009

Modified by: Claudio Valderrama C. (robocop)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10300 ]

Fix Version: 2.5.0 [ 10221 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 19, 2009

Modified by: @dyemanov

Fix Version: 2.5.0 [ 10221 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2011

Modified by: @pcisar

Link: This issue is related to QA404 [ QA404 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 7, 2011

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment