Question: Error, (in evala/Factors) input must be polynomials over the integers

Hi,

 

I'm using Java OpenMaple interface to call Maple functions from Java on Ubuntu Linux. I'm following the examples provided on Maple website. My Java code:

 

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class test {

    public static void main( String args[] ) throws Exception {

        String[] a = {"java"};

        Engine  t = new Engine( a, new EngineCallBacksDefault(), null, null );

        try {

            t.evaluate( "factor(-8*((16*I)*g**4*(-4*mc**2+u)**(-2)*(4*mb**2-u)**(-2)*u**(-1)*(12*mb**2-u)*(-4*s*mb**2+16*mb**4-4*u*mb**2+t*u-4*t*mb**2)*s*(4*s*mb**2+4*mc**2*s+16*mc**2*mb**2-s**2-4*t*mc**2+t**2-4*t*mb**2)*(12*mc**2-u)+(16*I)*(4*s*mb**2+4*mc**2*s+u**2-4*mc**2*u+16*mc**2*mb**2-4*u*mb**2-s**2)*(12*mc**2-t)*g**4*(t-4*mb**2)**(-2)*(4*mc**2-t)**(-2)*(-t+12*mb**2)*(-4*s*mb**2+16*mb**4-4*u*mb**2+t*u-4*t*mb**2)*s*t**(-1))**2);" );

        }

        catch ( MapleException e ) {

            System.out.println(e);

        }

    }

}

 

Maple throws exception:

com.maplesoft.externalcall.MapleException: Error, (in evala/Factors) input must be polynomials over the integers

The input polynoial is valid (when coping and pasting `factor(...)` directly into Maple interface, all works). When trying to factor simple polynomials like "x**2 - I*x" all goes fine too. Tried both Maple 17 and 18 (Linux).

PS. There is no problem when running this code on OS X (I tried Maple 16, 17, 18),  but I need to be able to run Maple with Java on my Linux cluster.

 

Please Wait...