commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1047) No check for overflow in "ArithmeticUtils.pow"
Date Fri, 25 Oct 2013 15:11:32 GMT

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

Thomas Neidhart commented on MATH-1047:
---------------------------------------

The code for mulAndCheck(long, long) is indeed quite complex. Maybe we should also take there
the counterpart from guava LongMath.checkedMultiply if it passes our unit tests.

> 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)

Mime
View raw message