db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3874) Document numeric function ATAN2(float1,float2)
Date Tue, 23 Sep 2008 19:03:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633847#action_12633847
] 

Kim Haase commented on DERBY-3874:
----------------------------------

Well, here's what happens when I translate from the atan2 javadoc to what seems to work for
Derby. Does this seem appropriate?

Any clause that mentions infinity as an argument is inapplicable.
Signed zero is inapplicable.

* If the first argument is positive zero and the second argument is positive,
or the first argument is positive and finite and the second argument is
positive infinity, the result is positive zero.
* If the first argument is negative zero and the second argument is positive,
or the first argument is negative and finite and the second argument is
positive infinity, then the result is negative zero.

These become:

If the first argument is zero and the second argument is positive, the result
is zero.

* If the first argument is positive zero and the second argument is negative,
or the first argument is positive and finite and the second argument is
negative infinity, then the result is the double value closest to <i>pi</i>.
* If the first argument is negative zero and the second argument is negative,
or the first argument is negative and finite and the second argument is
negative infinity, then the result is the double value closest to -pi.

These become:

If the first argument is zero and the second argument is negative, the result
is the double value closest to pi. (Can you ever get -pi?)

* If the first argument is positive and the second argument is positive zero
or negative zero, or the first argument is positive infinity and the second
argument is finite, then the result is the double value closest to pi/2.

This becomes:

If the first argument is positive and the second argument is zero, the result
is the double value closest to pi/2.

* If the first argument is negative and the second argument is positive zero
or negative zero, or the first argument is negative infinity and the second
argument is finite, then the result is the double value closest to -pi/2.

This becomes:

If the first argument is negative and the second argument is zero, the result
is the double value closest to -pi/2.

* If both arguments are positive infinity, then the result is the double value
closest to pi/4.
* If the first argument is positive infinity and the second argument is
negative infinity, then the result is the double value closest to 3*pi/4.
* If the first argument is negative infinity and the second argument is
positive infinity, then the result is the double value closest to -pi/4.
* If both arguments are negative infinity, then the result is the double
value closest to -3*pi/4.

These are all inapplicable. 

> Document numeric function ATAN2(float1,float2)
> ----------------------------------------------
>
>                 Key: DERBY-3874
>                 URL: https://issues.apache.org/jira/browse/DERBY-3874
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kim Haase
>
> Document the numeric function ATAN2(float1,float2).
> Mentioned in the JDBC specification, appendix C.1.
> Implementation documented by the JavaDoc for StrictMath.atan2.
> According to the JDBC specification, table B-1, a JDBC float maps to a Java double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message