示例#1
0
文件: EulerPhi.java 项目: rjolly/jscl
 public Generic compute() {
   try {
     JSCLInteger en = parameter[0].integerValue();
     return en.phi();
   } catch (NotIntegerException e) {
   }
   return expressionValue();
 }
示例#2
0
文件: Cot.java 项目: rjolly/jscl
 public Generic identity(Generic a, Generic b) {
   Generic ta = new Cot(a).evalsimp();
   Generic tb = new Cot(b).evalsimp();
   return new Frac(ta.multiply(tb).subtract(JSCLInteger.valueOf(1)), ta.add(tb)).evalsimp();
 }
示例#3
0
文件: Cot.java 项目: rjolly/jscl
 public Generic derivative(int n) {
   return JSCLInteger.valueOf(1).add(new Cot(parameter[0]).evaluate().pow(2)).negate();
 }
示例#4
0
文件: Cot.java 项目: rjolly/jscl
 public Generic antiderivative(int n) throws NotIntegrableException {
   return new Log(JSCLInteger.valueOf(4).multiply(new Sin(parameter[0]).evaluate())).evaluate();
 }