commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <>
Subject [jira] [Commented] (NUMBERS-43) Remove "round(float)" methods?
Date Tue, 13 Jun 2017 23:30:00 GMT


Bruno P. Kinoshita commented on NUMBERS-43:

>(in these times where memory is not a scarce resources anymore)?

I think only when performance is an issue, users will want to have methods like this available.
This [thread|]
for instance contains several examples of why float is still included in the JVM. From what
I could tell, all the replies are about performance (memory, CPU).

I'm -0 to removing the method. I think the cost to maintain it is low, and while not really
useful most of the times, there could be cases where users running code in embedded hardware
or - who knows - GPU's would prefer to keep the data as float, and avoid creating doubles
if necessary.

> Remove "round(float)" methods?
> ------------------------------
>                 Key: NUMBERS-43
>                 URL:
>             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

View raw message