Navigation Menu

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-automations opened this issue Oct 27, 2010 · 9 comments
Closed

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

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

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulvink

How about 2.1.5 and 2.5.1 ?

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA555 [ QA555 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

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