Average Error: 0.0 → 0.0
Time: 23.7s
Precision: 64
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
\[\frac{1 + \log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right)}{2 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\]
\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}
\frac{1 + \log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right)}{2 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}
double f(double t) {
        double r2971955 = 1.0;
        double r2971956 = 2.0;
        double r2971957 = t;
        double r2971958 = r2971956 * r2971957;
        double r2971959 = r2971955 + r2971957;
        double r2971960 = r2971958 / r2971959;
        double r2971961 = r2971960 * r2971960;
        double r2971962 = r2971955 + r2971961;
        double r2971963 = r2971956 + r2971961;
        double r2971964 = r2971962 / r2971963;
        return r2971964;
}

double f(double t) {
        double r2971965 = 1.0;
        double r2971966 = t;
        double r2971967 = 2.0;
        double r2971968 = r2971966 * r2971967;
        double r2971969 = r2971965 + r2971966;
        double r2971970 = r2971968 / r2971969;
        double r2971971 = r2971970 * r2971970;
        double r2971972 = exp(r2971971);
        double r2971973 = log(r2971972);
        double r2971974 = r2971965 + r2971973;
        double r2971975 = r2971967 + r2971971;
        double r2971976 = r2971974 / r2971975;
        return r2971976;
}

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 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
  2. Using strategy rm
  3. Applied add-log-exp0.0

    \[\leadsto \frac{1 + \color{blue}{\log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
  4. Final simplification0.0

    \[\leadsto \frac{1 + \log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right)}{2 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\]

Reproduce

herbie shell --seed 2019158 
(FPCore (t)
  :name "Kahan p13 Example 1"
  (/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))