Buggy code:
private final int [ ] [ ] sizes ; private final int [ ] [ ] derivativesIndirection ; private final int [ ] lowerIndirection ; private final int [ ] [ ] [ ] multIndirection ; private final int [ ] [ ] [ ] compIndirection ; private DSCompiler ( final int parameters , final int order , final DSCompiler valueCompiler , final DSCompiler derivativeCompiler ) { } public static DSCompiler getCompiler ( int parameters , int order ) { } private static int [ ] [ ] compileSizes ( final int parameters , final int order , final DSCompiler valueCompiler ) { } private static int [ ] [ ] compileDerivativesIndirection ( final int parameters , final int order , final DSCompiler valueCompiler , final DSCompiler derivativeCompiler ) { } private static int [ ] compileLowerIndirection ( final int parameters , final int order , final DSCompiler valueCompiler , final DSCompiler derivativeCompiler ) { } private static int [ ] [ ] [ ] compileMultiplicationIndirection ( final int parameters , final int order , final DSCompiler valueCompiler , final DSCompiler derivativeCompiler , final int [ ] lowerIndirection ) { } private static int [ ] [ ] [ ] compileCompositionIndirection ( final int parameters , final int order , final DSCompiler valueCompiler , final DSCompiler derivativeCompiler , final int [ ] [ ] sizes , final int [ ] [ ] derivativesIndirection ) { } public int getPartialDerivativeIndex ( final int ... orders ) throws DimensionMismatchException , NumberIsTooLargeException { } private static int getPartialDerivativeIndex ( final int parameters , final int order , final int [ ] [ ] sizes , final int ... orders ) throws NumberIsTooLargeException { } private static int convertIndex ( final int index , final int srcP , final int [ ] [ ] srcDerivativesIndirection , final int destP , final int destO , final int [ ] [ ] destSizes ) { } public int [ ] getPartialDerivativeOrders ( final int index ) { } public int getFreeParameters ( ) { } public int getOrder ( ) { } public int getSize ( ) { } public void linearCombination ( final double a1 , final double [ ] c1 , final int offset1 , final double a2 , final double [ ] c2 , final int offset2 , final double [ ] result , final int resultOffset ) { } public void linearCombination ( final double a1 , final double [ ] c1 , final int offset1 , final double a2 , final double [ ] c2 , final int offset2 , final double a3 , final double [ ] c3 , final int offset3 , final double [ ] result , final int resultOffset ) { } public void linearCombination ( final double a1 , final double [ ] c1 , final int offset1 , final double a2 , final double [ ] c2 , final int offset2 , final double a3 , final double [ ] c3 , final int offset3 , final double a4 , final double [ ] c4 , final int offset4 , final double [ ] result , final int resultOffset ) { } public void add ( final double [ ] lhs , final int lhsOffset , final double [ ] rhs , final int rhsOffset , final double [ ] result , final int resultOffset ) { } public void subtract ( final double [ ] lhs , final int lhsOffset , final double [ ] rhs , final int rhsOffset , final double [ ] result , final int resultOffset ) { } public void multiply ( final double [ ] lhs , final int lhsOffset , final double [ ] rhs , final int rhsOffset , final double [ ] result , final int resultOffset ) { } public void divide ( final double [ ] lhs , final int lhsOffset , final double [ ] rhs , final int rhsOffset , final double [ ] result , final int resultOffset ) { } public void remainder ( final double [ ] lhs , final int lhsOffset , final double [ ] rhs , final int rhsOffset , final double [ ] result , final int resultOffset ) { <START_BUG> final double rem = ( lhs [ lhsOffset ] ) % ( rhs [ rhsOffset ] ) ; <END_BUG> final double k = FastMath . rint ( ( ( ( lhs [ lhsOffset ] ) - rem ) // ( rhs [ rhsOffset ] ) ) ) ; result [ resultOffset ] = rem ; for ( int i = 1 ; i < ( getSize ( ) ) ; ++ i ) { result [ ( resultOffset + i ) ] = ( lhs [ ( lhsOffset + i ) ] ) - ( k * ( rhs [ ( rhsOffset + i ) ] ) ) ; } } public void pow ( final double [ ] operand , final int operandOffset , final double p , final double [ ] result , final int resultOffset ) { } public void pow ( final double [ ] operand , final int operandOffset , final int n , final double [ ] result , final int resultOffset ) { } public void pow ( final double [ ] x , final int xOffset , final double [ ] y , final int yOffset , final double [ ] result , final int resultOffset ) { } public void rootN ( final double [ ] operand , final int operandOffset , final int n , final double [ ] result , final int resultOffset ) { } public void exp ( final double [ ] operand , final int operandOffset , final double [ ] result , final int resultOffset ) { } public void expm1 ( final double [ ] operand , final int operandOffset , final double [ ] result , final int resultOffset ) { }

Fix:
final double rem = FastMath . IEEEremainder ( lhs [ lhsOffset ] , rhs [ rhsOffset ] ) ;