[
https://issues.apache.org/jira/browse/DERBY-6083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584058#comment-13584058
]
Dag H. Wanvik commented on DERBY-6083:
--------------------------------------
Yes, we do, cf. test below:
ij> values -0.0;
1
----
0.0
1 row selected
ij> values asin(-0.0);
1
------------------------
0.0
It can also be seen in the code in NumberDataType#normalize{Real,Double}:
// Normalize negative floats to be "positive" (can't detect easily
// without using Float object because -0.0f = 0.0f)
// DERBY-2447: It shouldn't matter whether we compare to 0.0d or -0.0d,
// both should match negative zero, but comparing to 0.0d triggered
// this JVM bug: http://bugs.sun.com/view_bug.do?bug_id=6833879
if (fv == -0.0f) {
fv = 0.0f;
}
So it would seem the docs are wrong here.
> Update minimum/maximum floating-point values to align with DERBY-3398 fixes
> ---------------------------------------------------------------------------
>
> Key: DERBY-6083
> URL: https://issues.apache.org/jira/browse/DERBY-6083
> Project: Derby
> Issue Type: Task
> Components: Documentation
> Affects Versions: 10.10.0.0
> Reporter: Kim Haase
> Assignee: Kim Haase
> Priority: Minor
> Attachments: DERBY-6083.diff, DERBY-6083.stat, DERBY-6083.zip
>
>
> The limits for floating-point values have changed as a result of DERBY-3398
> and should be documented:
> Smallest DOUBLE: 4.9e-324 (aka Double.MIN_VALUE)
> Largest DOUBLE: 1.7976931348623157e+308 (aka Double.MAX_VALUE)
> Smallest positive DOUBLE: 2.2250738585072014E-308 (aka Double.MIN_NORMAL)
> Largest negative DOUBLE: -2.2250738585072014E-308
> Smallest REAL: 1.4e-45 (aka Float.MIN_VALUE)
> Largest REAL: 3.4028235e+38 (aka Float.MAX_VALUE)
> Smallest positive REAL: 1.17549435E-38 (aka Float.MIN_NORMAL)
> Largest negative REAL: -1.17549435E-38
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira