Average Error: 2.2 → 1.6
Time: 6.5s
Precision: binary64
\[\frac{x}{y} \cdot \left(z - t\right) + t\]
\[\begin{array}{l} \mathbf{if}\;y \le -6.87411635940552805 \cdot 10^{59}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{y} \cdot \left(z - t\right)\right) + t\\ \mathbf{elif}\;y \le 1.2846808360778829 \cdot 10^{-79}:\\ \;\;\;\;\left(\frac{x \cdot z}{y} - \frac{t \cdot x}{y}\right) + t\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \end{array}\]
\frac{x}{y} \cdot \left(z - t\right) + t
\begin{array}{l}
\mathbf{if}\;y \le -6.87411635940552805 \cdot 10^{59}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{y} \cdot \left(z - t\right)\right) + t\\

\mathbf{elif}\;y \le 1.2846808360778829 \cdot 10^{-79}:\\
\;\;\;\;\left(\frac{x \cdot z}{y} - \frac{t \cdot x}{y}\right) + t\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((y <= -6.874116359405528e+59)) {
		VAR = ((double) (((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / 1.0)) * ((double) (((double) (((double) cbrt(x)) / y)) * ((double) (z - t)))))) + t));
	} else {
		double VAR_1;
		if ((y <= 1.2846808360778829e-79)) {
			VAR_1 = ((double) (((double) (((double) (((double) (x * z)) / y)) - ((double) (((double) (t * x)) / y)))) + t));
		} else {
			VAR_1 = ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
		}
		VAR = VAR_1;
	}
	return VAR;
}

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.2
Target2.4
Herbie1.6
\[\begin{array}{l} \mathbf{if}\;z \lt 2.7594565545626922 \cdot 10^{-282}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \mathbf{elif}\;z \lt 2.326994450874436 \cdot 10^{-110}:\\ \;\;\;\;x \cdot \frac{z - t}{y} + t\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if y < -6.87411635940552805e59

    1. Initial program 1.3

      \[\frac{x}{y} \cdot \left(z - t\right) + t\]
    2. Using strategy rm
    3. Applied *-un-lft-identity1.3

      \[\leadsto \frac{x}{\color{blue}{1 \cdot y}} \cdot \left(z - t\right) + t\]
    4. Applied add-cube-cbrt1.7

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{1 \cdot y} \cdot \left(z - t\right) + t\]
    5. Applied times-frac1.7

      \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \frac{\sqrt[3]{x}}{y}\right)} \cdot \left(z - t\right) + t\]
    6. Applied associate-*l*1.1

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{y} \cdot \left(z - t\right)\right)} + t\]

    if -6.87411635940552805e59 < y < 1.2846808360778829e-79

    1. Initial program 3.3

      \[\frac{x}{y} \cdot \left(z - t\right) + t\]
    2. Using strategy rm
    3. Applied add-cube-cbrt4.1

      \[\leadsto \color{blue}{\left(\left(\sqrt[3]{\frac{x}{y}} \cdot \sqrt[3]{\frac{x}{y}}\right) \cdot \sqrt[3]{\frac{x}{y}}\right)} \cdot \left(z - t\right) + t\]
    4. Applied associate-*l*4.1

      \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{x}{y}} \cdot \sqrt[3]{\frac{x}{y}}\right) \cdot \left(\sqrt[3]{\frac{x}{y}} \cdot \left(z - t\right)\right)} + t\]
    5. Taylor expanded around 0 2.3

      \[\leadsto \color{blue}{\left(\frac{x \cdot z}{y} - \frac{t \cdot x}{y}\right)} + t\]

    if 1.2846808360778829e-79 < y

    1. Initial program 1.1

      \[\frac{x}{y} \cdot \left(z - t\right) + t\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -6.87411635940552805 \cdot 10^{59}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{y} \cdot \left(z - t\right)\right) + t\\ \mathbf{elif}\;y \le 1.2846808360778829 \cdot 10^{-79}:\\ \;\;\;\;\left(\frac{x \cdot z}{y} - \frac{t \cdot x}{y}\right) + t\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \end{array}\]

Reproduce

herbie shell --seed 2020162 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))

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