javolution / jscience

Tools & Libraries for the Advancement of Sciences (v5.0 - early 2018)
http://jscience.org
Other
85 stars 23 forks source link

GetVariables doesn't work properly when applied to a Function.Divide #4

Open RiccardoYorkeReali opened 4 years ago

RiccardoYorkeReali commented 4 years ago

Hi! I've opened the issue because I'm getting an unexpected behavior with method divide(). In particular this is the code I've written:

`

        Variable.Local<Real> varA = new Variable.Local<Real>("a");
        Variable.Local<Real> varB = new Variable.Local<Real>("b");

        Polynomial<Real> a = Polynomial.valueOf(Real.ONE, varA);
        Polynomial<Real> b = Polynomial.valueOf(Real.ONE, varB);

        Function<Real, Real> myExample =  a.divide(b);

` Now, when I debug my code, if I evaluate the expression "myExample.getVariables()", I get just one value "a", but not "b". The same happen if I invert the order of a and b (I get "b", but not "a")

Is there any explanation about it?

Thanks for your time