Average Error: 0.0 → 0.0
Time: 13.4s
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 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 2}\]
\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 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 2}
double f(double t) {
        double r2654250 = 1.0;
        double r2654251 = 2.0;
        double r2654252 = t;
        double r2654253 = r2654251 * r2654252;
        double r2654254 = r2654250 + r2654252;
        double r2654255 = r2654253 / r2654254;
        double r2654256 = r2654255 * r2654255;
        double r2654257 = r2654250 + r2654256;
        double r2654258 = r2654251 + r2654256;
        double r2654259 = r2654257 / r2654258;
        return r2654259;
}

double f(double t) {
        double r2654260 = 1.0;
        double r2654261 = t;
        double r2654262 = 2.0;
        double r2654263 = r2654261 * r2654262;
        double r2654264 = r2654260 + r2654261;
        double r2654265 = r2654263 / r2654264;
        double r2654266 = r2654265 * r2654265;
        double r2654267 = r2654260 + r2654266;
        double r2654268 = exp(r2654266);
        double r2654269 = log(r2654268);
        double r2654270 = r2654269 + r2654262;
        double r2654271 = r2654267 / r2654270;
        return r2654271;
}

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 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \color{blue}{\log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}}\]
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2019168 
(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))))))