org.apache.commons.compress.utils

## Class ExactMath

- java.lang.Object
- - org.apache.commons.compress.utils.ExactMath

-     public class ExactMath
      extends Object

  PRIVATE. Performs exact math through `Math` "exact" APIs.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `add(int x, long y)` Returns the int result of adding an int and a long, and throws an exception if the result overflows an int.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### add

          public static int add(int x,
                                long y)

      Returns the int result of adding an int and a long, and throws an exception if the result overflows an int.
      Parameters:
        `x` - the first value, an int.
        `y` - the second value, a long,
      Returns:
        the addition of both values.
      Throws:
        `ArithmeticException` - when y overflow an int.
        `ArithmeticException` - if the result overflows an int.

Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.