Average Error: 0.0 → 0.0
Time: 3.4s
Precision: binary64
Cost: 2240
\[\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{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{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{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}}
(FPCore (t)
 :precision binary64
 (/
  (+ 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))))))
(FPCore (t)
 :precision binary64
 (/
  (+ 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 (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 (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))));
}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error16.0
Cost27392
\[\frac{1 + \log \left(e^{{\left(\sqrt{\frac{2 \cdot t}{1 + t}}\right)}^{4}}\right)}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
Alternative 2
Error16.2
Cost2112
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{t \cdot \left(t \cdot 4\right)}{\left(1 + t\right) \cdot \left(1 + t\right)}}\]
Alternative 3
Error31.9
Cost1856
\[\frac{1 + \left(t \cdot t\right) \cdot \left(4 - t \cdot 8\right)}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
Alternative 4
Error0.0
Cost1728
\[\frac{1 + t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}}{2 + t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}}\]
Alternative 5
Error31.9
Cost1728
\[\frac{1 + \left(t \cdot t\right) \cdot \left(4 - t \cdot 8\right)}{2 + \frac{4 \cdot \left(t \cdot t\right)}{\left(1 + t\right) \cdot \left(1 + t\right)}}\]
Alternative 6
Error31.1
Cost1600
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \left(4 - \frac{8}{t}\right)}\]
Alternative 7
Error31.0
Cost1600
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + t \cdot \left(t \cdot 4\right)}\]
Alternative 8
Error30.0
Cost1472
\[\frac{1 + \left(t \cdot t\right) \cdot \left(4 - t \cdot 8\right)}{2 + \left(t \cdot t\right) \cdot \left(4 - t \cdot 8\right)}\]
Alternative 9
Error27.0
Cost1216
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{6}\]
Alternative 10
Error26.1
Cost64
\[0.5\]
Alternative 11
Error51.2
Cost64
\[1\]
Alternative 12
Error62.0
Cost64
\[0\]
Alternative 13
Error63.0
Cost64
\[-1\]

Error

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{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}}}\]
  3. Final simplification0.0

    \[\leadsto \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}}\]

Reproduce

herbie shell --seed 2021042 
(FPCore (t)
  :name "Kahan p13 Example 1"
  :precision binary64
  (/ (+ 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))))))