Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.8% → 99.2%
Time: 12.6s
Alternatives: 14
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 14 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: 92.8% 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: 99.2% 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 -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+306}\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 (- INFINITY)) (not (<= t_1 2e+306)))
     (+ 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 <= -((double) INFINITY)) || !(t_1 <= 2e+306)) {
		tmp = x + (z * ((y - x) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+306)) {
		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 <= -math.inf) or not (t_1 <= 2e+306):
		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 <= Float64(-Inf)) || !(t_1 <= 2e+306))
		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 <= -Inf) || ~((t_1 <= 2e+306)))
		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, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+306]], $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 -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+306}\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)) < -inf.0 or 2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 78.4%

      \[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. Simplified99.9%

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 2.00000000000000003e306

    1. Initial program 97.1%

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

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

Alternative 2: 72.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-40} \lor \neg \left(z \leq 5.2 \cdot 10^{-113}\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 -1.7e-40) (not (<= z 5.2e-113))) (* (- y x) (/ z t)) x))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.7e-40) || !(z <= 5.2e-113)) {
		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.7d-40)) .or. (.not. (z <= 5.2d-113))) 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.7e-40) || !(z <= 5.2e-113)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.7e-40) or not (z <= 5.2e-113):
		tmp = (y - x) * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.7e-40) || !(z <= 5.2e-113))
		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.7e-40) || ~((z <= 5.2e-113)))
		tmp = (y - x) * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-40], N[Not[LessEqual[z, 5.2e-113]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-40} \lor \neg \left(z \leq 5.2 \cdot 10^{-113}\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 < -1.69999999999999992e-40 or 5.1999999999999998e-113 < z

    1. Initial program 87.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-85.6%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv84.7%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num84.8%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv84.1%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num84.1%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - x \cdot \color{blue}{\frac{z}{t}} \]
    5. Applied egg-rr84.1%

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

      \[\leadsto \color{blue}{\frac{y \cdot z - x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. distribute-rgt-out--74.6%

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

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

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

    if -1.69999999999999992e-40 < z < 5.1999999999999998e-113

    1. Initial program 95.2%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in t around inf 73.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-40} \lor \neg \left(z \leq 5.2 \cdot 10^{-113}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 82.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+77} \lor \neg \left(z \leq 3 \cdot 10^{-73}\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 (or (<= z -5.5e+77) (not (<= z 3e-73)))
   (* (- y x) (/ z t))
   (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -5.5e+77) || !(z <= 3e-73)) {
		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 <= (-5.5d+77)) .or. (.not. (z <= 3d-73))) 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 <= -5.5e+77) || !(z <= 3e-73)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -5.5e+77) or not (z <= 3e-73):
		tmp = (y - x) * (z / t)
	else:
		tmp = x + (y * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -5.5e+77) || !(z <= 3e-73))
		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 <= -5.5e+77) || ~((z <= 3e-73)))
		tmp = (y - x) * (z / t);
	else
		tmp = x + (y * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.5e+77], N[Not[LessEqual[z, 3e-73]], $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 -5.5 \cdot 10^{+77} \lor \neg \left(z \leq 3 \cdot 10^{-73}\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 2 regimes
  2. if z < -5.50000000000000036e77 or 3e-73 < z

    1. Initial program 85.5%

      \[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}{t} \cdot z} \]
    3. Simplified97.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub82.8%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-82.8%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv81.6%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num81.7%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv80.8%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num80.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z - x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. distribute-rgt-out--78.5%

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

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

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

    if -5.50000000000000036e77 < z < 3e-73

    1. Initial program 95.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 87.5%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified87.1%

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

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

Alternative 4: 82.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+77} \lor \neg \left(z \leq 4.8 \cdot 10^{-74}\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6499999999999999e77 or 4.7999999999999998e-74 < z

    1. Initial program 85.5%

      \[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}{t} \cdot z} \]
    3. Simplified97.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub82.8%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-82.8%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv81.6%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num81.7%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv80.8%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num80.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z - x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. distribute-rgt-out--78.5%

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

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

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

    if -1.6499999999999999e77 < z < 4.7999999999999998e-74

    1. Initial program 95.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 87.5%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified87.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Applied egg-rr87.1%

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

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

Alternative 5: 82.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+78} \lor \neg \left(z \leq 3 \cdot 10^{-73}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -3.25e+78) (not (<= z 3e-73)))
   (* (- y x) (/ z t))
   (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.25e+78) || !(z <= 3e-73)) {
		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 <= (-3.25d+78)) .or. (.not. (z <= 3d-73))) 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 <= -3.25e+78) || !(z <= 3e-73)) {
		tmp = (y - x) * (z / t);
	} else {
		tmp = x + ((y * z) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.25e+78) or not (z <= 3e-73):
		tmp = (y - x) * (z / t)
	else:
		tmp = x + ((y * z) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.25e+78) || !(z <= 3e-73))
		tmp = Float64(Float64(y - x) * Float64(z / t));
	else
		tmp = Float64(x + Float64(Float64(y * z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.25e+78) || ~((z <= 3e-73)))
		tmp = (y - x) * (z / t);
	else
		tmp = x + ((y * z) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.25e+78], N[Not[LessEqual[z, 3e-73]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{+78} \lor \neg \left(z \leq 3 \cdot 10^{-73}\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.25000000000000018e78 or 3e-73 < z

    1. Initial program 85.5%

      \[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}{t} \cdot z} \]
    3. Simplified97.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub82.8%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-82.8%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv81.6%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num81.7%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv80.8%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num80.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z - x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. distribute-rgt-out--78.5%

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

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

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

    if -3.25000000000000018e78 < z < 3e-73

    1. Initial program 95.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 87.5%

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

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{t} \]
    6. Simplified87.5%

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

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

Alternative 6: 83.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-68} \lor \neg \left(y \leq 1.05 \cdot 10^{+66}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.06e-68 or 1.05000000000000003e66 < y

    1. Initial program 88.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 86.1%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Applied egg-rr92.2%

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

    if -1.06e-68 < y < 1.05000000000000003e66

    1. Initial program 92.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num97.4%

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    6. Taylor expanded in y around 0 86.3%

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

        \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot x}}{t} \]
      2. associate-/l*87.7%

        \[\leadsto x + -1 \cdot \color{blue}{\frac{z}{\frac{t}{x}}} \]
      3. neg-mul-187.7%

        \[\leadsto x + \color{blue}{\left(-\frac{z}{\frac{t}{x}}\right)} \]
      4. sub-neg87.7%

        \[\leadsto \color{blue}{x - \frac{z}{\frac{t}{x}}} \]
      5. associate-/l*86.3%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/87.7%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified87.7%

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

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

Alternative 7: 83.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-73} \lor \neg \left(y \leq 1.05 \cdot 10^{+66}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3e-73 or 1.05000000000000003e66 < y

    1. Initial program 88.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 86.1%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Applied egg-rr92.2%

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

    if -3e-73 < y < 1.05000000000000003e66

    1. Initial program 92.7%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{z \cdot \left(-x\right)}}{t} \]
    4. Simplified86.3%

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

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

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

        \[\leadsto x + \left(z \cdot \left(-\color{blue}{\sqrt{x \cdot x}}\right)\right) \cdot \frac{1}{t} \]
      4. sqr-neg52.7%

        \[\leadsto x + \left(z \cdot \left(-\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}\right)\right) \cdot \frac{1}{t} \]
      5. sqrt-unprod24.9%

        \[\leadsto x + \left(z \cdot \left(-\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}\right)\right) \cdot \frac{1}{t} \]
      6. add-sqr-sqrt48.8%

        \[\leadsto x + \left(z \cdot \left(-\color{blue}{\left(-x\right)}\right)\right) \cdot \frac{1}{t} \]
      7. distribute-rgt-neg-in48.8%

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(-x\right)\right)} \cdot \frac{1}{t} \]
      8. cancel-sign-sub-inv48.8%

        \[\leadsto \color{blue}{x - \left(z \cdot \left(-x\right)\right) \cdot \frac{1}{t}} \]
      9. div-inv48.8%

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{t}{-x}}} \]
      11. add-sqr-sqrt24.9%

        \[\leadsto x - \frac{z}{\frac{t}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}} \]
      12. sqrt-unprod52.7%

        \[\leadsto x - \frac{z}{\frac{t}{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}} \]
      13. sqr-neg52.7%

        \[\leadsto x - \frac{z}{\frac{t}{\sqrt{\color{blue}{x \cdot x}}}} \]
      14. sqrt-unprod43.4%

        \[\leadsto x - \frac{z}{\frac{t}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}} \]
      15. add-sqr-sqrt87.7%

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

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

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

Alternative 8: 85.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.9 \cdot 10^{-69} \lor \neg \left(y \leq 1.05 \cdot 10^{+66}\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 -6.9e-69) (not (<= y 1.05e+66)))
   (+ x (/ y (/ t z)))
   (- x (* x (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -6.9e-69) || !(y <= 1.05e+66)) {
		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 <= (-6.9d-69)) .or. (.not. (y <= 1.05d+66))) 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 <= -6.9e-69) || !(y <= 1.05e+66)) {
		tmp = x + (y / (t / z));
	} else {
		tmp = x - (x * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -6.9e-69) or not (y <= 1.05e+66):
		tmp = x + (y / (t / z))
	else:
		tmp = x - (x * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -6.9e-69) || !(y <= 1.05e+66))
		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 <= -6.9e-69) || ~((y <= 1.05e+66)))
		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, -6.9e-69], N[Not[LessEqual[y, 1.05e+66]], $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 -6.9 \cdot 10^{-69} \lor \neg \left(y \leq 1.05 \cdot 10^{+66}\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 < -6.8999999999999997e-69 or 1.05000000000000003e66 < y

    1. Initial program 88.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 86.1%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Applied egg-rr92.2%

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

    if -6.8999999999999997e-69 < y < 1.05000000000000003e66

    1. Initial program 92.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around 0 86.3%

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

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

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

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

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

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

Alternative 9: 54.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+38} \lor \neg \left(z \leq 3 \cdot 10^{-22}\right):\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -3.3e+38) (not (<= z 3e-22))) (* z (/ y t)) x))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.3e+38) || !(z <= 3e-22)) {
		tmp = z * (y / 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 <= (-3.3d+38)) .or. (.not. (z <= 3d-22))) then
        tmp = z * (y / 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 <= -3.3e+38) || !(z <= 3e-22)) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.3e+38) or not (z <= 3e-22):
		tmp = z * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.3e+38) || !(z <= 3e-22))
		tmp = Float64(z * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.3e+38) || ~((z <= 3e-22)))
		tmp = z * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.3e+38], N[Not[LessEqual[z, 3e-22]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+38} \lor \neg \left(z \leq 3 \cdot 10^{-22}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2999999999999999e38 or 2.9999999999999999e-22 < z

    1. Initial program 85.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub83.2%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-83.2%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv82.1%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num82.2%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv81.3%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num81.3%

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

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

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

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

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

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

    if -3.2999999999999999e38 < z < 2.9999999999999999e-22

    1. Initial program 96.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in t around inf 67.1%

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

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

Alternative 10: 54.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.05e+38) (* z (/ y t)) (if (<= z 3.65e-22) x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.05e+38) {
		tmp = z * (y / t);
	} else if (z <= 3.65e-22) {
		tmp = x;
	} else {
		tmp = 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 <= (-2.05d+38)) then
        tmp = z * (y / t)
    else if (z <= 3.65d-22) then
        tmp = x
    else
        tmp = 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 <= -2.05e+38) {
		tmp = z * (y / t);
	} else if (z <= 3.65e-22) {
		tmp = x;
	} else {
		tmp = y * (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.05e+38:
		tmp = z * (y / t)
	elif z <= 3.65e-22:
		tmp = x
	else:
		tmp = y * (z / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.05e+38)
		tmp = Float64(z * Float64(y / t));
	elseif (z <= 3.65e-22)
		tmp = x;
	else
		tmp = Float64(y * Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.05e+38)
		tmp = z * (y / t);
	elseif (z <= 3.65e-22)
		tmp = x;
	else
		tmp = y * (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.05e+38], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.65e-22], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.65 \cdot 10^{-22}:\\
\;\;\;\;x\\

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


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

    1. Initial program 86.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. Simplified99.9%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub80.0%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-80.0%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv78.1%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num78.1%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv77.9%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num78.0%

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

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

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

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

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

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

    if -2.0500000000000002e38 < z < 3.65000000000000014e-22

    1. Initial program 96.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in t around inf 67.1%

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

    if 3.65000000000000014e-22 < z

    1. Initial program 83.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub85.2%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-85.2%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv84.6%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num84.8%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv83.4%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num83.4%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. *-commutative48.8%

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
    10. Applied egg-rr60.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 11: 55.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.5e+38) (/ y (/ t z)) (if (<= z 1.55e-20) x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.5e+38) {
		tmp = y / (t / z);
	} else if (z <= 1.55e-20) {
		tmp = x;
	} else {
		tmp = 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 <= (-2.5d+38)) then
        tmp = y / (t / z)
    else if (z <= 1.55d-20) then
        tmp = x
    else
        tmp = 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 <= -2.5e+38) {
		tmp = y / (t / z);
	} else if (z <= 1.55e-20) {
		tmp = x;
	} else {
		tmp = y * (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.5e+38:
		tmp = y / (t / z)
	elif z <= 1.55e-20:
		tmp = x
	else:
		tmp = y * (z / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.5e+38)
		tmp = Float64(y / Float64(t / z));
	elseif (z <= 1.55e-20)
		tmp = x;
	else
		tmp = Float64(y * Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.5e+38)
		tmp = y / (t / z);
	elseif (z <= 1.55e-20)
		tmp = x;
	else
		tmp = y * (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.5e+38], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-20], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-20}:\\
\;\;\;\;x\\

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


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

    1. Initial program 86.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. Simplified99.9%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub80.0%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-80.0%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv78.1%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num78.1%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv77.9%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num78.0%

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    9. Step-by-step derivation
      1. *-commutative55.4%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. associate-/r/55.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    10. Applied egg-rr55.4%

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

    if -2.49999999999999985e38 < z < 1.55e-20

    1. Initial program 96.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in t around inf 67.1%

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

    if 1.55e-20 < z

    1. Initial program 83.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      3. div-sub85.2%

        \[\leadsto x + \color{blue}{\left(\frac{y}{\frac{t}{z}} - \frac{x}{\frac{t}{z}}\right)} \]
      4. associate-+r-85.2%

        \[\leadsto \color{blue}{\left(x + \frac{y}{\frac{t}{z}}\right) - \frac{x}{\frac{t}{z}}} \]
      5. div-inv84.6%

        \[\leadsto \left(x + \color{blue}{y \cdot \frac{1}{\frac{t}{z}}}\right) - \frac{x}{\frac{t}{z}} \]
      6. clear-num84.8%

        \[\leadsto \left(x + y \cdot \color{blue}{\frac{z}{t}}\right) - \frac{x}{\frac{t}{z}} \]
      7. div-inv83.4%

        \[\leadsto \left(x + y \cdot \frac{z}{t}\right) - \color{blue}{x \cdot \frac{1}{\frac{t}{z}}} \]
      8. clear-num83.4%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. *-commutative48.8%

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
    10. Applied egg-rr60.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 12: 92.6% 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 90.6%

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

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

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

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

Alternative 13: 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 90.6%

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

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

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

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

Alternative 14: 38.6% 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 90.6%

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

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

    \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
  4. Taylor expanded in t around inf 40.8%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification40.8%

    \[\leadsto x \]

Developer target: 97.6% 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 2023301 
(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)))