[ 
https://issues.apache.org/jira/browse/NUMBERS-150?focusedWorklogId=474473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-474473
 ]

ASF GitHub Bot logged work on NUMBERS-150:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Aug/20 19:21
            Start Date: 25/Aug/20 19:21
    Worklog Time Spent: 10m 
      Work Description: XenoAmess commented on a change in pull request #83:
URL: https://github.com/apache/commons-numbers/pull/83#discussion_r476682533



##########
File path: 
commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/FractionTest.java
##########
@@ -622,6 +624,17 @@ void testMath1261() {
         assertFraction(1, Integer.MAX_VALUE, b.divide(2));
     }
 
+    @Test
+    void testNumbers150(){
+        // zero to negative powers should throw an exception
+        assertThrows(ArithmeticException.class, () -> Fraction.ZERO.pow(-1));
+        assertThrows(ArithmeticException.class, () -> 
Fraction.ZERO.pow(Integer.MIN_VALUE));

Review comment:
       @aherbert done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 474473)
    Time Spent: 2h 50m  (was: 2h 40m)

> Fraction.pow to correctly handle Integer.MIN_VALUE as the argument
> ------------------------------------------------------------------
>
>                 Key: NUMBERS-150
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-150
>             Project: Commons Numbers
>          Issue Type: Bug
>          Components: fraction
>            Reporter: Jin Xu
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> a bug was discovered by [NUMBERS-149].
> here is the fix pr.
> https://github.com/apache/commons-numbers/pull/83



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

Reply via email to