Average Error: 0.0 → 0.0
Time: 1.8s
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{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)\right)}^{3}}}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\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{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)\right)}^{3}}}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\right)}}{2}
double code(double t) {
	return ((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)))));
}
double code(double t) {
	return ((cbrt(pow(fma(((2.0 * t) / (1.0 + t)), ((2.0 * t) / (1.0 + t)), 1.0), 3.0)) / fma((2.0 / (1.0 + t)), (t * (t / (1.0 + t))), 1.0)) / 2.0);
}

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. Simplified0.0

    \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\right)}}{2}}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube0.0

    \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right) \cdot \mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)\right) \cdot \mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)}}}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\right)}}{2}\]
  5. Simplified0.0

    \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)\right)}^{3}}}}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\right)}}{2}\]
  6. Final simplification0.0

    \[\leadsto \frac{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 1\right)\right)}^{3}}}{\mathsf{fma}\left(\frac{2}{1 + t}, t \cdot \frac{t}{1 + t}, 1\right)}}{2}\]

Reproduce

herbie shell --seed 2020102 +o rules:numerics
(FPCore (t)
  :name "Kahan p13 Example 1"
  :precision binary64
  (/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))