All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jscl.math.function.Inv Maven / Gradle / Ivy

The newest version!
package jscl.math.function;

import jscl.math.Generic;
import jscl.math.JSCLInteger;
import jscl.math.NotDivisibleException;
import jscl.math.Variable;

public class Inv extends Frac {
    public Inv(Generic generic) {
        super(JSCLInteger.valueOf(1),generic);
    }

    public Generic evaluate() {
        if(JSCLInteger.valueOf(1).multiple(parameter())) {
            return JSCLInteger.valueOf(1).divide(parameter());
        }
        return expressionValue();
    }

    public Generic parameter() {
        return parameter[1];
    }

    protected Variable newinstance() {
        return new Inv(null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy