예제 #1
0
  public Funcion derivar(String var) {

    Funcion LadoIzq = new Mult(Num.derivar(var), Den);
    Funcion LadoDer = new Mult(Num, Den.derivar(var));
    Funcion Abajo = new Potencia(Num, new Numero(2));
    Funcion Arriba = new Suma(LadoIzq, new Mult(new Numero(-1.0), LadoDer));
    Funcion derivada = new Mult(Arriba, new Potencia(Abajo, new Numero(-1)));
    return derivada;
  }
예제 #2
0
 public double resolver() {
   return (operacion1.resolver() + operacion2.resolver());
 }
예제 #3
0
 @Override
 public String toString() {
   return "(" + Num.toString() + ")" + "/" + "(" + Den.toString() + ")";
 }
예제 #4
0
  public double evaluar(Hashtable<String, Double> Table) {

    double evalArg1 = Num.evaluar(Table);
    double evalArg2 = Den.evaluar(Table);
    return evalArg1 / evalArg2;
  }