Package com.oracle.truffle.api

## Class ExactMath

- java.lang.Object
- - com.oracle.truffle.api.ExactMath

    public class ExactMath
    extends java.lang.Object

This class contains methods that will be part of java.lang.Math starting with JDK 8. Until JDK 8 is release, we duplicate them here because they are generally useful for dynamic language implementations.

### Constructor Summary

Constructors
`ExactMath()`

### Method Summary

All Methods Static Methods Concrete Methods
`static int` `addExact​(int x, int y)`
`static long` `addExact​(long x, long y)`
`static int` `multiplyExact​(int x, int y)`
`static long` `multiplyExact​(long x, long y)`
`static int` `multiplyHigh​(int x, int y)`
`static long` `multiplyHigh​(long x, long y)`
`static int` `multiplyHighUnsigned​(int x, int y)`
`static long` `multiplyHighUnsigned​(long x, long y)`
`static int` `subtractExact​(int x, int y)`
`static long` `subtractExact​(long x, long y)`

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

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

### Constructor Detail

#### ExactMath

    public ExactMath()

### Method Detail

#### addExact

    public static int addExact​(int x,
                               int y)

#### addExact

    public static long addExact​(long x,
                                long y)

#### subtractExact

    public static int subtractExact​(int x,
                                    int y)

#### subtractExact

    public static long subtractExact​(long x,
                                     long y)

#### multiplyExact

    public static int multiplyExact​(int x,
                                    int y)

#### multiplyExact

    public static long multiplyExact​(long x,
                                     long y)

#### multiplyHigh

    public static int multiplyHigh​(int x,
                                   int y)

#### multiplyHighUnsigned

    public static int multiplyHighUnsigned​(int x,
                                           int y)

#### multiplyHigh

    public static long multiplyHigh​(long x,
                                    long y)

#### multiplyHighUnsigned

    public static long multiplyHighUnsigned​(long x,
                                            long y)