<?xml version="1.0" encoding="utf-8" standalone="no"?><?xml-stylesheet href="/mathmlc2p.xsl" type="text/xsl"?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fateman</title>
</head>
<body>
<tt>
// Reference : Richard Fateman, update on fast mult benchmark ( <a href="http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/63d2a000ac527be4/">http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/63d2a000ac527be4/</a> )<br/>
<br/>
import jscl.math.Variable;<br/>
import jscl.math.polynomial.Polynomial;<br/>
static import jscl.math.Predef.*;<br/>
<br/>
x = variable(&quot;x&quot;);<br/>
y = variable(&quot;y&quot;);<br/>
z = variable(&quot;z&quot;);<br/>
<br/>
p=Polynomial.factory(new Variable[] {x.variableValue(),y.variableValue(),z.variableValue()}).valueof(integer(&quot;1&quot;).add(x).add(y).add(z)).pow(20);<br/>
t=System.currentTimeMillis();<br/>
p=p.multiply(p);<br/>
t=System.currentTimeMillis()-t;<br/>
print(t);<br/>
</tt>
</body>
</html>
