[ 
https://issues.apache.org/jira/browse/NUMBERS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356411#comment-17356411
 ] 

Gilles Sadowski commented on NUMBERS-161:
-----------------------------------------

{quote}Is Angle intended as a replacement for PlaneAngle?
{quote}
Yes; if "Angle" looks good enough, I'll remove the other two classes.
{quote}Why not use the full unit names in the class names, e.g. Radians instead 
of Rad?
{quote}
It's a case where I think that the abbreviation helps[1] while still being 
standard (cf. calculator).
{quote}Are you going to add standard normalizers, similar to 
PlaneAngleRadians.WITHIN_0_AND_2PI?
{quote}
Do you want me to? :)
 Are they useful?

[1] Cannot be shorter, now that we have "Angle" instead of "PlaneAngle". [Maybe 
another reason that an arithmetic API will not be very appealing to potential 
users...]

> PlaneAngle Numerical Accuracy
> -----------------------------
>
>                 Key: NUMBERS-161
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-161
>             Project: Commons Numbers
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Assignee: Gilles Sadowski
>            Priority: Major
>
> The current {{PlaneAngle}} class introduces unnecessary round-off errors 
> during use since it internally converts all values to turns. For example, it 
> is currently impossible to represent the radians value {{Double.MIN_NORMAL}} 
> exactly since the internal multiplication introduces errors: 
> {{PlaneAngle.ofRadians(Double.MIN_NORMAL).toRadians()}} does not equal 
> {{Double.MIN_NORMAL}}. We should restructure this API so that values are 
> stored exactly and multiplication is only performed when required.
> This issue was discovered during work on GEOMETRY-124. Use of the new 
> {{Reduce}} class added two more floating point operations to angle 
> normalization and caused a regression in commons-geometry-spherical.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to