Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 93.2% → 98.7%
Time: 7.8s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - x\right) \cdot z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((y - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
def code(x, y, z, t):
	return x + (((y - x) * z) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + (((y - x) * z) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 93.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - x\right) \cdot z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((y - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
def code(x, y, z, t):
	return x + (((y - x) * z) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + (((y - x) * z) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}

Alternative 1: 98.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+294} \lor \neg \left(t_1 \leq 2 \cdot 10^{+299}\right):\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y x) z) t))))
   (if (or (<= t_1 -1e+294) (not (<= t_1 2e+299)))
     (+ x (* z (/ (- y x) t)))
     t_1)))
double code(double x, double y, double z, double t) {
	double t_1 = x + (((y - x) * z) / t);
	double tmp;
	if ((t_1 <= -1e+294) || !(t_1 <= 2e+299)) {
		tmp = x + (z * ((y - x) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) * z) / t)
    if ((t_1 <= (-1d+294)) .or. (.not. (t_1 <= 2d+299))) then
        tmp = x + (z * ((y - x) / t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (((y - x) * z) / t);
	double tmp;
	if ((t_1 <= -1e+294) || !(t_1 <= 2e+299)) {
		tmp = x + (z * ((y - x) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (((y - x) * z) / t)
	tmp = 0
	if (t_1 <= -1e+294) or not (t_1 <= 2e+299):
		tmp = x + (z * ((y - x) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) * z) / t))
	tmp = 0.0
	if ((t_1 <= -1e+294) || !(t_1 <= 2e+299))
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (((y - x) * z) / t);
	tmp = 0.0;
	if ((t_1 <= -1e+294) || ~((t_1 <= 2e+299)))
		tmp = x + (z * ((y - x) / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+294], N[Not[LessEqual[t$95$1, 2e+299]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+294} \lor \neg \left(t_1 \leq 2 \cdot 10^{+299}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < -1.00000000000000007e294 or 2.0000000000000001e299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 80.7%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Applied egg-rr99.9%

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

    if -1.00000000000000007e294 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 2.0000000000000001e299

    1. Initial program 99.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -1 \cdot 10^{+294} \lor \neg \left(x + \frac{\left(y - x\right) \cdot z}{t} \leq 2 \cdot 10^{+299}\right):\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \end{array} \]

Alternative 2: 70.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.22 \cdot 10^{+24} \lor \neg \left(z \leq -3.8 \cdot 10^{-42}\right) \land \left(z \leq -3.3 \cdot 10^{-100} \lor \neg \left(z \leq 6.2 \cdot 10^{-85}\right)\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.22e+24)
         (and (not (<= z -3.8e-42))
              (or (<= z -3.3e-100) (not (<= z 6.2e-85)))))
   (* (- y x) (/ z t))
   x))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.22e+24) || (!(z <= -3.8e-42) && ((z <= -3.3e-100) || !(z <= 6.2e-85)))) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-2.22d+24)) .or. (.not. (z <= (-3.8d-42))) .and. (z <= (-3.3d-100)) .or. (.not. (z <= 6.2d-85))) then
        tmp = (y - x) * (z / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.22e+24) || (!(z <= -3.8e-42) && ((z <= -3.3e-100) || !(z <= 6.2e-85)))) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.22e+24) or (not (z <= -3.8e-42) and ((z <= -3.3e-100) or not (z <= 6.2e-85))):
		tmp = (y - x) * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.22e+24) || (!(z <= -3.8e-42) && ((z <= -3.3e-100) || !(z <= 6.2e-85))))
		tmp = Float64(Float64(y - x) * Float64(z / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.22e+24) || (~((z <= -3.8e-42)) && ((z <= -3.3e-100) || ~((z <= 6.2e-85)))))
		tmp = (y - x) * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.22e+24], And[N[Not[LessEqual[z, -3.8e-42]], $MachinePrecision], Or[LessEqual[z, -3.3e-100], N[Not[LessEqual[z, 6.2e-85]], $MachinePrecision]]]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.22 \cdot 10^{+24} \lor \neg \left(z \leq -3.8 \cdot 10^{-42}\right) \land \left(z \leq -3.3 \cdot 10^{-100} \lor \neg \left(z \leq 6.2 \cdot 10^{-85}\right)\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.21999999999999994e24 or -3.80000000000000017e-42 < z < -3.29999999999999996e-100 or 6.2000000000000005e-85 < z

    1. Initial program 88.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 75.9%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative75.9%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/80.3%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr80.3%

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

    if -2.21999999999999994e24 < z < -3.80000000000000017e-42 or -3.29999999999999996e-100 < z < 6.2000000000000005e-85

    1. Initial program 99.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 73.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.22 \cdot 10^{+24} \lor \neg \left(z \leq -3.8 \cdot 10^{-42}\right) \land \left(z \leq -3.3 \cdot 10^{-100} \lor \neg \left(z \leq 6.2 \cdot 10^{-85}\right)\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 71.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-44}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-100} \lor \neg \left(z \leq 4.2 \cdot 10^{-86}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.02e+28)
   (* z (/ (- y x) t))
   (if (<= z -4.2e-44)
     x
     (if (or (<= z -4.5e-100) (not (<= z 4.2e-86))) (* (- y x) (/ z t)) x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.02e+28) {
		tmp = z * ((y - x) / t);
	} else if (z <= -4.2e-44) {
		tmp = x;
	} else if ((z <= -4.5e-100) || !(z <= 4.2e-86)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.02d+28)) then
        tmp = z * ((y - x) / t)
    else if (z <= (-4.2d-44)) then
        tmp = x
    else if ((z <= (-4.5d-100)) .or. (.not. (z <= 4.2d-86))) then
        tmp = (y - x) * (z / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.02e+28) {
		tmp = z * ((y - x) / t);
	} else if (z <= -4.2e-44) {
		tmp = x;
	} else if ((z <= -4.5e-100) || !(z <= 4.2e-86)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.02e+28:
		tmp = z * ((y - x) / t)
	elif z <= -4.2e-44:
		tmp = x
	elif (z <= -4.5e-100) or not (z <= 4.2e-86):
		tmp = (y - x) * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.02e+28)
		tmp = Float64(z * Float64(Float64(y - x) / t));
	elseif (z <= -4.2e-44)
		tmp = x;
	elseif ((z <= -4.5e-100) || !(z <= 4.2e-86))
		tmp = Float64(Float64(y - x) * Float64(z / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.02e+28)
		tmp = z * ((y - x) / t);
	elseif (z <= -4.2e-44)
		tmp = x;
	elseif ((z <= -4.5e-100) || ~((z <= 4.2e-86)))
		tmp = (y - x) * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.02e+28], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-44], x, If[Or[LessEqual[z, -4.5e-100], N[Not[LessEqual[z, 4.2e-86]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+28}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-44}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-100} \lor \neg \left(z \leq 4.2 \cdot 10^{-86}\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.02e28

    1. Initial program 84.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 78.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*l/99.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    4. Applied egg-rr89.4%

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

    if -1.02e28 < z < -4.20000000000000003e-44 or -4.5000000000000001e-100 < z < 4.2e-86

    1. Initial program 99.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 73.7%

      \[\leadsto \color{blue}{x} \]

    if -4.20000000000000003e-44 < z < -4.5000000000000001e-100 or 4.2e-86 < z

    1. Initial program 91.7%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 74.2%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative74.2%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/78.2%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr78.2%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-44}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-100} \lor \neg \left(z \leq 4.2 \cdot 10^{-86}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 83.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-65} \lor \neg \left(z \leq 0.48\right) \land z \leq 4.6 \cdot 10^{+89}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -4.5e+57)
   (* z (/ (- y x) t))
   (if (or (<= z 5.1e-65) (and (not (<= z 0.48)) (<= z 4.6e+89)))
     (+ x (* y (/ z t)))
     (* (- y x) (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.5e+57) {
		tmp = z * ((y - x) / t);
	} else if ((z <= 5.1e-65) || (!(z <= 0.48) && (z <= 4.6e+89))) {
		tmp = x + (y * (z / t));
	} else {
		tmp = (y - x) * (z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-4.5d+57)) then
        tmp = z * ((y - x) / t)
    else if ((z <= 5.1d-65) .or. (.not. (z <= 0.48d0)) .and. (z <= 4.6d+89)) then
        tmp = x + (y * (z / t))
    else
        tmp = (y - x) * (z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.5e+57) {
		tmp = z * ((y - x) / t);
	} else if ((z <= 5.1e-65) || (!(z <= 0.48) && (z <= 4.6e+89))) {
		tmp = x + (y * (z / t));
	} else {
		tmp = (y - x) * (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -4.5e+57:
		tmp = z * ((y - x) / t)
	elif (z <= 5.1e-65) or (not (z <= 0.48) and (z <= 4.6e+89)):
		tmp = x + (y * (z / t))
	else:
		tmp = (y - x) * (z / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4.5e+57)
		tmp = Float64(z * Float64(Float64(y - x) / t));
	elseif ((z <= 5.1e-65) || (!(z <= 0.48) && (z <= 4.6e+89)))
		tmp = Float64(x + Float64(y * Float64(z / t)));
	else
		tmp = Float64(Float64(y - x) * Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -4.5e+57)
		tmp = z * ((y - x) / t);
	elseif ((z <= 5.1e-65) || (~((z <= 0.48)) && (z <= 4.6e+89)))
		tmp = x + (y * (z / t));
	else
		tmp = (y - x) * (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.5e+57], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 5.1e-65], And[N[Not[LessEqual[z, 0.48]], $MachinePrecision], LessEqual[z, 4.6e+89]]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+57}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

\mathbf{elif}\;z \leq 5.1 \cdot 10^{-65} \lor \neg \left(z \leq 0.48\right) \land z \leq 4.6 \cdot 10^{+89}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.49999999999999996e57

    1. Initial program 82.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 77.1%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    4. Applied egg-rr89.6%

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

    if -4.49999999999999996e57 < z < 5.10000000000000001e-65 or 0.47999999999999998 < z < 4.5999999999999998e89

    1. Initial program 97.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 90.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/30.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified90.6%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]

    if 5.10000000000000001e-65 < z < 0.47999999999999998 or 4.5999999999999998e89 < z

    1. Initial program 90.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 83.7%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative83.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/88.4%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr88.4%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-65} \lor \neg \left(z \leq 0.48\right) \land z \leq 4.6 \cdot 10^{+89}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \end{array} \]

Alternative 5: 83.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 0.46 \lor \neg \left(z \leq 3.3 \cdot 10^{+92}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.2e+57)
   (* z (/ (- y x) t))
   (if (<= z 2.4e-63)
     (+ x (/ y (/ t z)))
     (if (or (<= z 0.46) (not (<= z 3.3e+92)))
       (* (- y x) (/ z t))
       (+ x (* y (/ z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e+57) {
		tmp = z * ((y - x) / t);
	} else if (z <= 2.4e-63) {
		tmp = x + (y / (t / z));
	} else if ((z <= 0.46) || !(z <= 3.3e+92)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.2d+57)) then
        tmp = z * ((y - x) / t)
    else if (z <= 2.4d-63) then
        tmp = x + (y / (t / z))
    else if ((z <= 0.46d0) .or. (.not. (z <= 3.3d+92))) then
        tmp = (y - x) * (z / t)
    else
        tmp = x + (y * (z / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e+57) {
		tmp = z * ((y - x) / t);
	} else if (z <= 2.4e-63) {
		tmp = x + (y / (t / z));
	} else if ((z <= 0.46) || !(z <= 3.3e+92)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.2e+57:
		tmp = z * ((y - x) / t)
	elif z <= 2.4e-63:
		tmp = x + (y / (t / z))
	elif (z <= 0.46) or not (z <= 3.3e+92):
		tmp = (y - x) * (z / t)
	else:
		tmp = x + (y * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.2e+57)
		tmp = Float64(z * Float64(Float64(y - x) / t));
	elseif (z <= 2.4e-63)
		tmp = Float64(x + Float64(y / Float64(t / z)));
	elseif ((z <= 0.46) || !(z <= 3.3e+92))
		tmp = Float64(Float64(y - x) * Float64(z / t));
	else
		tmp = Float64(x + Float64(y * Float64(z / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.2e+57)
		tmp = z * ((y - x) / t);
	elseif (z <= 2.4e-63)
		tmp = x + (y / (t / z));
	elseif ((z <= 0.46) || ~((z <= 3.3e+92)))
		tmp = (y - x) * (z / t);
	else
		tmp = x + (y * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.2e+57], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-63], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 0.46], N[Not[LessEqual[z, 3.3e+92]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+57}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq 0.46 \lor \neg \left(z \leq 3.3 \cdot 10^{+92}\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.20000000000000002e57

    1. Initial program 82.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 77.1%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    4. Applied egg-rr89.6%

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

    if -1.20000000000000002e57 < z < 2.4000000000000001e-63

    1. Initial program 99.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 92.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/28.6%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified90.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num28.6%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv28.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr90.9%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]

    if 2.4000000000000001e-63 < z < 0.46000000000000002 or 3.29999999999999974e92 < z

    1. Initial program 90.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 83.7%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative83.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/88.4%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr88.4%

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

    if 0.46000000000000002 < z < 3.29999999999999974e92

    1. Initial program 90.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 79.5%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/39.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified89.5%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification89.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 0.46 \lor \neg \left(z \leq 3.3 \cdot 10^{+92}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 6: 54.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-238}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 1.86 \cdot 10^{-196}:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq 6.9 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -1.6e+81)
   x
   (if (<= t -4.4e-238)
     (* z (/ y t))
     (if (<= t 1.86e-196)
       (* (/ z t) (- x))
       (if (<= t 6.9e-18) (/ y (/ t z)) x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.6e+81) {
		tmp = x;
	} else if (t <= -4.4e-238) {
		tmp = z * (y / t);
	} else if (t <= 1.86e-196) {
		tmp = (z / t) * -x;
	} else if (t <= 6.9e-18) {
		tmp = y / (t / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.6d+81)) then
        tmp = x
    else if (t <= (-4.4d-238)) then
        tmp = z * (y / t)
    else if (t <= 1.86d-196) then
        tmp = (z / t) * -x
    else if (t <= 6.9d-18) then
        tmp = y / (t / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.6e+81) {
		tmp = x;
	} else if (t <= -4.4e-238) {
		tmp = z * (y / t);
	} else if (t <= 1.86e-196) {
		tmp = (z / t) * -x;
	} else if (t <= 6.9e-18) {
		tmp = y / (t / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -1.6e+81:
		tmp = x
	elif t <= -4.4e-238:
		tmp = z * (y / t)
	elif t <= 1.86e-196:
		tmp = (z / t) * -x
	elif t <= 6.9e-18:
		tmp = y / (t / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.6e+81)
		tmp = x;
	elseif (t <= -4.4e-238)
		tmp = Float64(z * Float64(y / t));
	elseif (t <= 1.86e-196)
		tmp = Float64(Float64(z / t) * Float64(-x));
	elseif (t <= 6.9e-18)
		tmp = Float64(y / Float64(t / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.6e+81)
		tmp = x;
	elseif (t <= -4.4e-238)
		tmp = z * (y / t);
	elseif (t <= 1.86e-196)
		tmp = (z / t) * -x;
	elseif (t <= 6.9e-18)
		tmp = y / (t / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e+81], x, If[LessEqual[t, -4.4e-238], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.86e-196], N[(N[(z / t), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[t, 6.9e-18], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-238}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

\mathbf{elif}\;t \leq 1.86 \cdot 10^{-196}:\\
\;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\

\mathbf{elif}\;t \leq 6.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6e81 or 6.9000000000000003e-18 < t

    1. Initial program 85.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 65.1%

      \[\leadsto \color{blue}{x} \]

    if -1.6e81 < t < -4.39999999999999982e-238

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 77.8%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 56.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*l/56.2%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative56.2%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    5. Simplified56.2%

      \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]

    if -4.39999999999999982e-238 < t < 1.8600000000000001e-196

    1. Initial program 98.1%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 93.7%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around 0 72.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/72.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(z \cdot x\right)}{t}} \]
      2. mul-1-neg72.2%

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out72.2%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{t} \]
      4. associate-*l/72.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(-x\right)} \]
    5. Simplified72.8%

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

    if 1.8600000000000001e-196 < t < 6.9000000000000003e-18

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 82.2%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 63.9%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/63.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified63.9%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    6. Step-by-step derivation
      1. clear-num63.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv64.0%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Applied egg-rr64.0%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification63.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-238}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 1.86 \cdot 10^{-196}:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq 6.9 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 85.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+21} \lor \neg \left(y \leq 6.2 \cdot 10^{-33}\right):\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -3.4e+21) (not (<= y 6.2e-33)))
   (+ x (/ y (/ t z)))
   (- x (* x (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -3.4e+21) || !(y <= 6.2e-33)) {
		tmp = x + (y / (t / z));
	} else {
		tmp = x - (x * (z / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y <= (-3.4d+21)) .or. (.not. (y <= 6.2d-33))) then
        tmp = x + (y / (t / z))
    else
        tmp = x - (x * (z / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -3.4e+21) || !(y <= 6.2e-33)) {
		tmp = x + (y / (t / z));
	} else {
		tmp = x - (x * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -3.4e+21) or not (y <= 6.2e-33):
		tmp = x + (y / (t / z))
	else:
		tmp = x - (x * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -3.4e+21) || !(y <= 6.2e-33))
		tmp = Float64(x + Float64(y / Float64(t / z)));
	else
		tmp = Float64(x - Float64(x * Float64(z / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -3.4e+21) || ~((y <= 6.2e-33)))
		tmp = x + (y / (t / z));
	else
		tmp = x - (x * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.4e+21], N[Not[LessEqual[y, 6.2e-33]], $MachinePrecision]], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+21} \lor \neg \left(y \leq 6.2 \cdot 10^{-33}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.4e21 or 6.19999999999999994e-33 < y

    1. Initial program 88.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 86.2%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/67.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified93.5%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num67.8%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv67.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr93.5%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]

    if -3.4e21 < y < 6.19999999999999994e-33

    1. Initial program 96.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in x around inf 86.2%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right) \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative86.2%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      2. distribute-lft-in86.2%

        \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-1 \cdot \frac{z}{t}\right)} \]
      3. *-rgt-identity86.2%

        \[\leadsto \color{blue}{x} + x \cdot \left(-1 \cdot \frac{z}{t}\right) \]
      4. mul-1-neg86.2%

        \[\leadsto x + x \cdot \color{blue}{\left(-\frac{z}{t}\right)} \]
      5. distribute-rgt-neg-in86.2%

        \[\leadsto x + \color{blue}{\left(-x \cdot \frac{z}{t}\right)} \]
      6. unsub-neg86.2%

        \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
    4. Simplified86.2%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+21} \lor \neg \left(y \leq 6.2 \cdot 10^{-33}\right):\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \end{array} \]

Alternative 8: 86.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+21} \lor \neg \left(y \leq 1.1 \cdot 10^{-35}\right):\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -1.12e+21) (not (<= y 1.1e-35)))
   (+ x (/ y (/ t z)))
   (- x (/ x (/ t z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.12e+21) || !(y <= 1.1e-35)) {
		tmp = x + (y / (t / z));
	} else {
		tmp = x - (x / (t / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y <= (-1.12d+21)) .or. (.not. (y <= 1.1d-35))) then
        tmp = x + (y / (t / z))
    else
        tmp = x - (x / (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.12e+21) || !(y <= 1.1e-35)) {
		tmp = x + (y / (t / z));
	} else {
		tmp = x - (x / (t / z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -1.12e+21) or not (y <= 1.1e-35):
		tmp = x + (y / (t / z))
	else:
		tmp = x - (x / (t / z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -1.12e+21) || !(y <= 1.1e-35))
		tmp = Float64(x + Float64(y / Float64(t / z)));
	else
		tmp = Float64(x - Float64(x / Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -1.12e+21) || ~((y <= 1.1e-35)))
		tmp = x + (y / (t / z));
	else
		tmp = x - (x / (t / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.12e+21], N[Not[LessEqual[y, 1.1e-35]], $MachinePrecision]], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+21} \lor \neg \left(y \leq 1.1 \cdot 10^{-35}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x}{\frac{t}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.12e21 or 1.09999999999999997e-35 < y

    1. Initial program 88.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 86.2%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/67.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified93.5%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num67.8%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv67.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr93.5%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]

    if -1.12e21 < y < 1.09999999999999997e-35

    1. Initial program 96.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in x around inf 86.2%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right) \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative86.2%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      2. distribute-lft-in86.2%

        \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-1 \cdot \frac{z}{t}\right)} \]
      3. *-rgt-identity86.2%

        \[\leadsto \color{blue}{x} + x \cdot \left(-1 \cdot \frac{z}{t}\right) \]
      4. mul-1-neg86.2%

        \[\leadsto x + x \cdot \color{blue}{\left(-\frac{z}{t}\right)} \]
      5. distribute-rgt-neg-in86.2%

        \[\leadsto x + \color{blue}{\left(-x \cdot \frac{z}{t}\right)} \]
      6. unsub-neg86.2%

        \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
    4. Simplified86.2%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num86.1%

        \[\leadsto x - x \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv86.5%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{t}{z}}} \]
    6. Applied egg-rr86.5%

      \[\leadsto x - \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+21} \lor \neg \left(y \leq 1.1 \cdot 10^{-35}\right):\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 9: 56.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -1.45e+81) x (if (<= t 3.1e-19) (* y (/ z t)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.45e+81) {
		tmp = x;
	} else if (t <= 3.1e-19) {
		tmp = y * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.45d+81)) then
        tmp = x
    else if (t <= 3.1d-19) then
        tmp = y * (z / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.45e+81) {
		tmp = x;
	} else if (t <= 3.1e-19) {
		tmp = y * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -1.45e+81:
		tmp = x
	elif t <= 3.1e-19:
		tmp = y * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.45e+81)
		tmp = x;
	elseif (t <= 3.1e-19)
		tmp = Float64(y * Float64(z / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.45e+81)
		tmp = x;
	elseif (t <= 3.1e-19)
		tmp = y * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.45e+81], x, If[LessEqual[t, 3.1e-19], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-19}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.45e81 or 3.0999999999999999e-19 < t

    1. Initial program 85.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 65.1%

      \[\leadsto \color{blue}{x} \]

    if -1.45e81 < t < 3.0999999999999999e-19

    1. Initial program 99.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 82.9%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 55.0%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/55.7%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified55.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 93.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + z \cdot \frac{y - x}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* z (/ (- y x) t))))
double code(double x, double y, double z, double t) {
	return x + (z * ((y - x) / t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (z * ((y - x) / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + (z * ((y - x) / t));
}
def code(x, y, z, t):
	return x + (z * ((y - x) / t))
function code(x, y, z, t)
	return Float64(x + Float64(z * Float64(Float64(y - x) / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + (z * ((y - x) / t));
end
code[x_, y_, z_, t_] := N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + z \cdot \frac{y - x}{t}
\end{array}
Derivation
  1. Initial program 92.9%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-*l/93.3%

      \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
  3. Applied egg-rr93.3%

    \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
  4. Final simplification93.3%

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

Alternative 11: 93.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{z}{\frac{t}{y - x}} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ z (/ t (- y x)))))
double code(double x, double y, double z, double t) {
	return x + (z / (t / (y - x)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (z / (t / (y - x)))
end function
public static double code(double x, double y, double z, double t) {
	return x + (z / (t / (y - x)));
}
def code(x, y, z, t):
	return x + (z / (t / (y - x)))
function code(x, y, z, t)
	return Float64(x + Float64(z / Float64(t / Float64(y - x))))
end
function tmp = code(x, y, z, t)
	tmp = x + (z / (t / (y - x)));
end
code[x_, y_, z_, t_] := N[(x + N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{z}{\frac{t}{y - x}}
\end{array}
Derivation
  1. Initial program 92.9%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-*l/93.3%

      \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
  3. Applied egg-rr93.3%

    \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
  4. Step-by-step derivation
    1. *-commutative93.3%

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{t}} \]
    2. clear-num92.9%

      \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
    3. un-div-inv93.9%

      \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
  5. Applied egg-rr93.9%

    \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
  6. Final simplification93.9%

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

Alternative 12: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y - x}{\frac{t}{z}} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (- y x) (/ t z))))
double code(double x, double y, double z, double t) {
	return x + ((y - x) / (t / z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((y - x) / (t / z))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y - x) / (t / z));
}
def code(x, y, z, t):
	return x + ((y - x) / (t / z))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y - x) / Float64(t / z)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y - x) / (t / z));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y - x}{\frac{t}{z}}
\end{array}
Derivation
  1. Initial program 92.9%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-/l*97.6%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{x + \frac{y - x}{\frac{t}{z}}} \]
  4. Final simplification97.6%

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

Alternative 13: 38.7% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 92.9%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Taylor expanded in z around 0 40.1%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification40.1%

    \[\leadsto x \]

Developer target: 98.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (< x -9.025511195533005e-135)
   (- x (* (/ z t) (- x y)))
   (if (< x 4.275032163700715e-250)
     (+ x (* (/ (- y x) t) z))
     (+ x (/ (- y x) (/ t z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x < -9.025511195533005e-135) {
		tmp = x - ((z / t) * (x - y));
	} else if (x < 4.275032163700715e-250) {
		tmp = x + (((y - x) / t) * z);
	} else {
		tmp = x + ((y - x) / (t / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x < (-9.025511195533005d-135)) then
        tmp = x - ((z / t) * (x - y))
    else if (x < 4.275032163700715d-250) then
        tmp = x + (((y - x) / t) * z)
    else
        tmp = x + ((y - x) / (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x < -9.025511195533005e-135) {
		tmp = x - ((z / t) * (x - y));
	} else if (x < 4.275032163700715e-250) {
		tmp = x + (((y - x) / t) * z);
	} else {
		tmp = x + ((y - x) / (t / z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x < -9.025511195533005e-135:
		tmp = x - ((z / t) * (x - y))
	elif x < 4.275032163700715e-250:
		tmp = x + (((y - x) / t) * z)
	else:
		tmp = x + ((y - x) / (t / z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x < -9.025511195533005e-135)
		tmp = Float64(x - Float64(Float64(z / t) * Float64(x - y)));
	elseif (x < 4.275032163700715e-250)
		tmp = Float64(x + Float64(Float64(Float64(y - x) / t) * z));
	else
		tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x < -9.025511195533005e-135)
		tmp = x - ((z / t) * (x - y));
	elseif (x < 4.275032163700715e-250)
		tmp = x + (((y - x) / t) * z);
	else
		tmp = x + ((y - x) / (t / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Less[x, -9.025511195533005e-135], N[(x - N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[x, 4.275032163700715e-250], N[(x + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\

\mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023195 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))

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