Average Error: 1.0 → 0
Time: 10.1s
Precision: 64
\[e^{2} - e^{1}\]
\[\sqrt{e^{2} - e^{1}} \cdot \sqrt{e^{2} - e^{1}}\]
e^{2} - e^{1}
\sqrt{e^{2} - e^{1}} \cdot \sqrt{e^{2} - e^{1}}
double f() {
        double r7321511 = 2.0;
        double r7321512 = exp(r7321511);
        double r7321513 = 1.0;
        double r7321514 = exp(r7321513);
        double r7321515 = r7321512 - r7321514;
        return r7321515;
}

double f() {
        double r7321516 = 2.0;
        double r7321517 = exp(r7321516);
        double r7321518 = 1.0;
        double r7321519 = exp(r7321518);
        double r7321520 = r7321517 - r7321519;
        double r7321521 = sqrt(r7321520);
        double r7321522 = r7321521 * r7321521;
        return r7321522;
}

Error

Try it out

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Derivation

    1. Initial program 1.0

      \[e^{2} - e^{1}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt0

      \[\leadsto \color{blue}{\sqrt{e^{2} - e^{1}} \cdot \sqrt{e^{2} - e^{1}}}\]
    4. Final simplification0

      \[\leadsto \sqrt{e^{2} - e^{1}} \cdot \sqrt{e^{2} - e^{1}}\]

    Reproduce

    herbie shell --seed 1 
    (FPCore ()
      :name "exp(2)-exp(1)"
      (- (exp 2.0) (exp 1.0)))