//+++++++++++++++++++++++++++++++++++++++++++++++++++++
// File automatically generated by Xfuzzy - DO NOT EDIT
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
package pkg.xfl.unary;
import xfuzzy.lang.*;
public class pow extends Unary {
public pow() {
super("xfl","pow");
Parameter single[] = new Parameter[1];
single[0] = new Parameter("w");
setSingleParameters(single);
}
public double compute(double a) {
double w = singleparam[0].value;
return Math.pow(a,w);
}
public double derivative(double a) {
double deriv;
double w = singleparam[0].value;
deriv = w * Math.pow(a,w-1);
return deriv;
}
public boolean test () {
double w = singleparam[0].value;
return ( w>0 );
}
public String getJavaCode() {
String eol = System.getProperty("line.separator", "\n");
String code = "";
code += " return Math.pow(a,w); "+eol;
return code;
}
public String getCCode() {
String eol = System.getProperty("line.separator", "\n");
String code = "";
code += " return pow(a,w); "+eol;
return code;
}
public String getCppCode() {
String eol = System.getProperty("line.separator", "\n");
String code = "";
code += " return pow(a,w); "+eol;
return code;
}
}