Average Error: 2.7 → 2.7
Time: 5.6s
Precision: binary64
Cost: 448
\[\frac{x}{y - z \cdot t}\]
\[\frac{x}{y - z \cdot t}\]
\frac{x}{y - z \cdot t}
\frac{x}{y - z \cdot t}
(FPCore (x y z t) :precision binary64 (/ x (- y (* z t))))
(FPCore (x y z t) :precision binary64 (/ x (- y (* z t))))
double code(double x, double y, double z, double t) {
	return x / (y - (z * t));
}
double code(double x, double y, double z, double t) {
	return x / (y - (z * t));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.7
Target1.8
Herbie2.7
\[\begin{array}{l} \mathbf{if}\;x < -1.618195973607049 \cdot 10^{+50}:\\ \;\;\;\;\frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\ \mathbf{elif}\;x < 2.1378306434876444 \cdot 10^{+131}:\\ \;\;\;\;\frac{x}{y - z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\ \end{array}\]

Alternatives

Alternative 1
Error3.6
Cost40000
\[\left(x \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt[3]{y - z \cdot t} \cdot \sqrt[3]{y - z \cdot t}}\right) \cdot \frac{\sqrt[3]{1}}{\sqrt[3]{y - z \cdot t}}\]
Alternative 2
Error3.8
Cost39872
\[\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{y - z \cdot t} \cdot \sqrt[3]{y - z \cdot t}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{y - z \cdot t}}\]
Alternative 3
Error33.5
Cost33088
\[\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt{y - z \cdot t}} \cdot \frac{\sqrt[3]{x}}{\sqrt{y - z \cdot t}}\]
Alternative 4
Error48.8
Cost26560
\[\frac{\sqrt{x}}{\sqrt{y - z \cdot t}} \cdot \frac{\sqrt{x}}{\sqrt{y - z \cdot t}}\]
Alternative 5
Error3.6
Cost20672
\[x \cdot \left(\frac{1}{\sqrt[3]{y - z \cdot t} \cdot \sqrt[3]{y - z \cdot t}} \cdot \frac{1}{\sqrt[3]{y - z \cdot t}}\right)\]
Alternative 6
Error3.6
Cost20672
\[\sqrt[3]{\frac{x}{y - z \cdot t}} \cdot \left(\sqrt[3]{\frac{x}{y - z \cdot t}} \cdot \sqrt[3]{\frac{x}{y - z \cdot t}}\right)\]
Alternative 7
Error3.6
Cost20544
\[\frac{1}{\sqrt[3]{y - z \cdot t} \cdot \sqrt[3]{y - z \cdot t}} \cdot \frac{x}{\sqrt[3]{y - z \cdot t}}\]
Alternative 8
Error3.6
Cost19904
\[\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{y - z \cdot t}{\sqrt[3]{x}}}\]
Alternative 9
Error3.6
Cost19904
\[\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{y - z \cdot t}\]
Alternative 10
Error45.1
Cost14528
\[\frac{x}{{y}^{3} - {\left(z \cdot t\right)}^{3}} \cdot \left(y \cdot y + \left(\left(z \cdot t\right) \cdot \left(z \cdot t\right) + y \cdot \left(z \cdot t\right)\right)\right)\]
Alternative 11
Error30.4
Cost13888
\[x \cdot \left(\sqrt{\frac{1}{y - z \cdot t}} \cdot \sqrt{\frac{1}{y - z \cdot t}}\right)\]
Alternative 12
Error33.3
Cost13760
\[x \cdot \frac{\frac{1}{\sqrt{y - z \cdot t}}}{\sqrt{y - z \cdot t}}\]
Alternative 13
Error33.3
Cost13760
\[\frac{1}{\sqrt{y - z \cdot t}} \cdot \frac{x}{\sqrt{y - z \cdot t}}\]
Alternative 14
Error33.3
Cost13632
\[\frac{\frac{x}{\sqrt{y - z \cdot t}}}{\sqrt{y - z \cdot t}}\]
Alternative 15
Error28.6
Cost13440
\[\frac{1}{\sqrt[3]{{\left(\frac{y - z \cdot t}{x}\right)}^{3}}}\]
Alternative 16
Error33.6
Cost13376
\[\frac{\sqrt{x}}{\frac{y - z \cdot t}{\sqrt{x}}}\]
Alternative 17
Error33.6
Cost13376
\[\sqrt{x} \cdot \frac{\sqrt{x}}{y - z \cdot t}\]
Alternative 18
Error28.6
Cost13312
\[\sqrt[3]{{\left(\frac{x}{y - z \cdot t}\right)}^{3}}\]
Alternative 19
Error26.6
Cost1344
\[x \cdot \left(\frac{1}{y \cdot y - \left(z \cdot t\right) \cdot \left(z \cdot t\right)} \cdot \left(y + z \cdot t\right)\right)\]
Alternative 20
Error30.0
Cost1216
\[\left(y + z \cdot t\right) \cdot \frac{x}{y \cdot y - \left(z \cdot t\right) \cdot \left(z \cdot t\right)}\]
Alternative 21
Error35.2
Cost832
\[\frac{x}{y} + \frac{x \cdot \left(z \cdot t\right)}{y \cdot y}\]
Alternative 22
Error2.9
Cost704
\[\frac{\frac{1}{y - z \cdot t}}{\frac{1}{x}}\]
Alternative 23
Error3.4
Cost704
\[\frac{1}{\left(y - z \cdot t\right) \cdot \frac{1}{x}}\]
Alternative 24
Error32.9
Cost576
\[\frac{1}{\left(z \cdot t\right) \cdot \frac{-1}{x}}\]
Alternative 25
Error2.9
Cost576
\[x \cdot \frac{1}{y - z \cdot t}\]
Alternative 26
Error3.4
Cost576
\[\frac{1}{\frac{y - z \cdot t}{x}}\]
Alternative 27
Error32.9
Cost512
\[\frac{1}{\frac{-z \cdot t}{x}}\]
Alternative 28
Error32.8
Cost448
\[x \cdot \frac{-1}{z \cdot t}\]
Alternative 29
Error32.7
Cost384
\[\frac{-x}{z \cdot t}\]
Alternative 30
Error30.6
Cost320
\[\frac{1}{\frac{y}{x}}\]
Alternative 31
Error30.3
Cost192
\[\frac{x}{y}\]
Alternative 32
Error61.7
Cost64
\[1\]
Alternative 33
Error45.9
Cost64
\[0\]
Alternative 34
Error61.7
Cost64
\[-1\]

Error

Derivation

  1. Initial program 2.7

    \[\frac{x}{y - z \cdot t}\]
  2. Simplified2.7

    \[\leadsto \color{blue}{\frac{x}{y - z \cdot t}}\]
  3. Final simplification2.7

    \[\leadsto \frac{x}{y - z \cdot t}\]

Reproduce

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

  :herbie-target
  (if (< x -1.618195973607049e+50) (/ 1.0 (- (/ y x) (* (/ z x) t))) (if (< x 2.1378306434876444e+131) (/ x (- y (* z t))) (/ 1.0 (- (/ y x) (* (/ z x) t)))))

  (/ x (- y (* z t))))