You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2013/10/25 17:41:30 UTC
[jira] [Comment Edited] (MATH-1047) No check for overflow in
"ArithmeticUtils.pow"
[ https://issues.apache.org/jira/browse/MATH-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13805385#comment-13805385 ]
Gilles edited comment on MATH-1047 at 10/25/13 3:40 PM:
--------------------------------------------------------
bq. Maybe we should also take there the counterpart from guava
No idea.
In the meantime, I'd rather add the checks in the way that looks least disruptive.
If performance was a significant target for this method, maybe there should be an associated test; then we can test alternate implementations. But none should be allowed to return nonsense.
was (Author: erans):
bq. Maybe we should also take there the counterpart from guava
No idea.
In the meantime, I'd rather add the checks in the way that looks least disruptive.
If performance was a significant target for this method, maybe there should be a associated test (optional, like for FastMath); then we can test alternate implementations. But none should be allowed to return nonsense.
> No check for overflow in "ArithmeticUtils.pow"
> ----------------------------------------------
>
> Key: MATH-1047
> URL: https://issues.apache.org/jira/browse/MATH-1047
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.2
> Reporter: Gilles
> Labels: safety
> Fix For: 3.3
>
> Attachments: MATH-1047.patch
>
>
> The "pow" methods in "o.a.c.m.util.ArithmeticUtils" do not check for overflow.
> They will happily return nonsensical results.
--
This message was sent by Atlassian JIRA
(v6.1#6144)