All pastes #488345 Raw Edit

Something

public java v1 · immutable
·published 2007-05-14 23:22 UTC
rendered paste body
// Multiplication of two polynomialspublic static Poly polyTimes (Poly A, Poly B)	{		// Determine length of coefficient array		int lengthC = A.coeffs.length * B.coeffs.length;		// Determine common denominator		long denomC = A.denominator * B.denominator;		// Create return value		Poly C = new Poly ( A.variableName, new long [lengthC], denomC);		// Set all coefficients to 0		for (int i = 0; i < C.coeffs.length; i++)				{ C.coeffs[i] = 0; };		for ( i=0; i<A.coeffs.length; i++)			{ for (j=0; j<B.coeffs.length; j++)			 	{ foo bar				 }			}	}