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

Gilles commented on NUMBERS-43:
-------------------------------

This issue came about because FindBugs signals a problem in the 
{{roundUnscaled}} method.
Amey wanted to implement FindBugs' suggestion, although a comment says that the 
statement is _intentional_.
I don't have the time to try and understand (with additional unit tests and 
benchmarks) whether this is OK or not, even less to figure out where the method 
would still be required/useful.

My proposal is to remove anything and everything that creates (or will create) 
trouble for no reason.
If necessary, this page is tracking history and the code can be recovered from 
the source repository, to be added in 1.x if actual use-cases appear.

Bruno, the discussion you refer to is interesting but beside the point: there, 
they discuss something (the {{float}} type) *used* by libraries, that obviously 
wouldn't work anymore if it were removed from the language. Here I suggest to 
remove a utility which has *no* identified usage (cf. "Commons Math" codebase).

Avoiding creating {{double}} could be a valid argument; but does it mean that 
we intend to actively support {{float}} manipulations, e.g. have classes like 
{{Complex}} provide {{float}} accuracy?  I don't think so; so we'd have a few 
methods which we won't ever remove, even though nobody will ever use them. :(

Passing data to and from a GPU is an interesting use-case (IIRC, Eric Barnhill 
intended to provide some support in the {{o.a.c.numbers.complex}} package). Are 
the {{float}} methods defined in {{Precision}} helpful tools for those 
manipulations? In the affirmative, we must keep them. If not, why bother (in 
v1.0)?


What about 
# Perform the crusade (limited to the yet unreleased "Numbers"...) ;)
# Make a note about it in the "ANNOUNCE" message and in the "RELEASE NOTES"

?

Then, depending on the feedback, we can go forward with what the user community 
really needs/wants.


> Remove "round(float)" methods?
> ------------------------------
>
>                 Key: NUMBERS-43
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-43
>             Project: Commons Numbers
>          Issue Type: Wish
>            Reporter: Gilles
>              Labels: api, float
>             Fix For: 1.0
>
>
> In class {{Precision}}, there are methods for rounding {{float}} values, e.g.
> {code:java}
> public static float round(float x, int scale, int roundingMethod) { /* ... */ 
> }
> {code}
> Is there any use for supporting specific handling of floats (in these times 
> where memory is not a scarce resources anymore)?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to