Average Error: 0.0 → 0.0
Time: 32.0s
Precision: 64
\[\frac{1.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\]
\[\frac{1.0 + \left(\log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right) + \log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right)\right)}{2.0 + \frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}\]
\frac{1.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}
\frac{1.0 + \left(\log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right) + \log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right)\right)}{2.0 + \frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}
double f(double t) {
        double r2251972 = 1.0;
        double r2251973 = 2.0;
        double r2251974 = t;
        double r2251975 = r2251973 * r2251974;
        double r2251976 = r2251972 + r2251974;
        double r2251977 = r2251975 / r2251976;
        double r2251978 = r2251977 * r2251977;
        double r2251979 = r2251972 + r2251978;
        double r2251980 = r2251973 + r2251978;
        double r2251981 = r2251979 / r2251980;
        return r2251981;
}

double f(double t) {
        double r2251982 = 1.0;
        double r2251983 = t;
        double r2251984 = 2.0;
        double r2251985 = r2251983 * r2251984;
        double r2251986 = r2251982 + r2251983;
        double r2251987 = r2251985 / r2251986;
        double r2251988 = r2251987 * r2251987;
        double r2251989 = exp(r2251988);
        double r2251990 = sqrt(r2251989);
        double r2251991 = log(r2251990);
        double r2251992 = r2251991 + r2251991;
        double r2251993 = r2251982 + r2251992;
        double r2251994 = r2251984 + r2251988;
        double r2251995 = r2251993 / r2251994;
        return r2251995;
}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{1.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\]
  2. Using strategy rm
  3. Applied add-log-exp0.0

    \[\leadsto \frac{1.0 + \color{blue}{\log \left(e^{\frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\right)}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.0

    \[\leadsto \frac{1.0 + \log \color{blue}{\left(\sqrt{e^{\frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}} \cdot \sqrt{e^{\frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}}\right)}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\]
  6. Applied log-prod0.0

    \[\leadsto \frac{1.0 + \color{blue}{\left(\log \left(\sqrt{e^{\frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}}\right) + \log \left(\sqrt{e^{\frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}}\right)\right)}}{2.0 + \frac{2.0 \cdot t}{1.0 + t} \cdot \frac{2.0 \cdot t}{1.0 + t}}\]
  7. Final simplification0.0

    \[\leadsto \frac{1.0 + \left(\log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right) + \log \left(\sqrt{e^{\frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}}\right)\right)}{2.0 + \frac{t \cdot 2.0}{1.0 + t} \cdot \frac{t \cdot 2.0}{1.0 + t}}\]

Reproduce

herbie shell --seed 2019165 +o rules:numerics
(FPCore (t)
  :name "Kahan p13 Example 1"
  (/ (+ 1.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t)))) (+ 2.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t))))))