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

ATAN2 returns incorrect value for (0, 0) [CORE3201] #3575

Closed
firebird-issue-importer opened this issue Oct 27, 2010 · 9 comments
Closed

ATAN2 returns incorrect value for (0, 0) [CORE3201] #3575

firebird-issue-importer opened this issue Oct 27, 2010 · 9 comments

Comments

@firebird-issue-importer

Submitted by: @paulvink

Is related to QA555

The internal function ATAN2(0, 0) returns 0.000000

This is incorrect, as (0, 0) doesn't define a tangent, not even an "infinite" one like e.g. (3, 0) does.
If both arguments are 0, an exception should be raised or NaN returned.

Commits: f26d9a4

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 2, 2011

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 2, 2011

Commented by: @asfernandes

I first created a new message "Arguments for @1 cannot be simultaneously zero". Then I saw Oracle gives "Evaluation of an value expression causes an overflow/underflow".

We already have "Floating point overflow in built-in function @1".

What's the better message to use?

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 2, 2011

Commented by: @paulvink

I strongly suggest the separate message, although I would rephrase it as "Arguments for @1 cannot both be zero" (or: "...may not both be zero").

There's no question of over- or underflow here, or division by zero -- just of something being undefined.

Also, the separate message is very clear to the user. The other messages might still leave him wondering what he did wrong.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 3, 2011

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 4, 2011

Commented by: @paulvink

How about 2.1.5 and 2.5.1 ?

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 29, 2014

Modified by: @pcisar

Link: This issue is related to QA555 [ QA555 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 28, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 23, 2015

Commented by: @pcisar

Test created.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 23, 2015

Modified by: @pcisar

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

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