Esempio n. 1
0
 @Override
 public Object call(ExecutionContext context, Object self, Object... args) {
   final Double arg = Types.toNumber(context, args[0]).doubleValue();
   if (arg.isInfinite() || arg.isNaN()) {
     return Double.NaN;
   }
   return Math.coerceLongIfPossible(java.lang.Math.tan(arg));
 }
Esempio n. 2
0
 @Override
 public Object call(ExecutionContext context, Object self, Object... args) {
   Double x = Types.toNumber(context, args[0]).doubleValue();
   Double y = Types.toNumber(context, args[1]).doubleValue();
   return Math.coerceLongIfPossible(java.lang.Math.pow(x, y));
 }