Average Error: 16.7 → 16.2
Time: 5.1s
Precision: 64
\[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]
\[\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (((double) (x + ((double) (((double) (y * z)) / t)))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (((double) (x + ((double) (z / ((double) (t / y)))))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.7
Target13.5
Herbie16.2
\[\begin{array}{l} \mathbf{if}\;t \lt -1.3659085366310088 \cdot 10^{-271}:\\ \;\;\;\;1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\ \mathbf{elif}\;t \lt 3.0369671037372459 \cdot 10^{-130}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\ \end{array}\]

Derivation

  1. Initial program 16.7

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]
  2. Using strategy rm
  3. Applied *-commutative16.7

    \[\leadsto \frac{x + \frac{\color{blue}{z \cdot y}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]
  4. Applied associate-/l*16.2

    \[\leadsto \frac{x + \color{blue}{\frac{z}{\frac{t}{y}}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]
  5. Final simplification16.2

    \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\]

Reproduce

herbie shell --seed 2020114 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (if (< t -1.3659085366310088e-271) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b)))))))

  (/ (+ x (/ (* y z) t)) (+ (+ a 1) (/ (* y b) t))))