Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.1% → 97.0%
Time: 9.2s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (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 - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\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 9 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: 84.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (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 - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{y - z}{t - z} \cdot x \end{array} \]
(FPCore (x y z t) :precision binary64 (* (/ (- y z) (- t z)) x))
double code(double x, double y, double z, double t) {
	return ((y - z) / (t - z)) * 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 = ((y - z) / (t - z)) * x
end function
public static double code(double x, double y, double z, double t) {
	return ((y - z) / (t - z)) * x;
}
def code(x, y, z, t):
	return ((y - z) / (t - z)) * x
function code(x, y, z, t)
	return Float64(Float64(Float64(y - z) / Float64(t - z)) * x)
end
function tmp = code(x, y, z, t)
	tmp = ((y - z) / (t - z)) * x;
end
code[x_, y_, z_, t_] := N[(N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    2. *-commutativeN/A

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \color{blue}{\frac{y - z}{t - z}} \cdot x \]
    5. --lowering--.f64N/A

      \[\leadsto \frac{\color{blue}{y - z}}{t - z} \cdot x \]
    6. --lowering--.f6498.3

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

    \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
  5. Add Preprocessing

Alternative 2: 74.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-241}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -4.6e+29)
     t_1
     (if (<= z 1.75e-241)
       (* (- y z) (/ x t))
       (if (<= z 9.2e+30) (/ (* y x) (- t z)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -4.6e+29) {
		tmp = t_1;
	} else if (z <= 1.75e-241) {
		tmp = (y - z) * (x / t);
	} else if (z <= 9.2e+30) {
		tmp = (y * x) / (t - z);
	} 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 * (1.0d0 - (y / z))
    if (z <= (-4.6d+29)) then
        tmp = t_1
    else if (z <= 1.75d-241) then
        tmp = (y - z) * (x / t)
    else if (z <= 9.2d+30) then
        tmp = (y * x) / (t - z)
    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 * (1.0 - (y / z));
	double tmp;
	if (z <= -4.6e+29) {
		tmp = t_1;
	} else if (z <= 1.75e-241) {
		tmp = (y - z) * (x / t);
	} else if (z <= 9.2e+30) {
		tmp = (y * x) / (t - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -4.6e+29:
		tmp = t_1
	elif z <= 1.75e-241:
		tmp = (y - z) * (x / t)
	elif z <= 9.2e+30:
		tmp = (y * x) / (t - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -4.6e+29)
		tmp = t_1;
	elseif (z <= 1.75e-241)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 9.2e+30)
		tmp = Float64(Float64(y * x) / Float64(t - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -4.6e+29)
		tmp = t_1;
	elseif (z <= 1.75e-241)
		tmp = (y - z) * (x / t);
	elseif (z <= 9.2e+30)
		tmp = (y * x) / (t - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+29], t$95$1, If[LessEqual[z, 1.75e-241], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+30], N[(N[(y * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.6000000000000002e29 or 9.2e30 < z

    1. Initial program 81.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \frac{y - z}{z}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - \frac{y - z}{z}\right)} \]
      6. div-subN/A

        \[\leadsto x \cdot \left(0 - \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto x \cdot \left(0 - \left(\frac{y}{z} - \color{blue}{1}\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(0 - \frac{y}{z}\right) + 1\right)} \]
      9. neg-sub0N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)} + 1\right) \]
      10. mul-1-negN/A

        \[\leadsto x \cdot \left(\color{blue}{-1 \cdot \frac{y}{z}} + 1\right) \]
      11. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{y}{z}\right)} \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)}\right) \]
      13. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      15. /-lowering-/.f6477.3

        \[\leadsto x \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
    5. Simplified77.3%

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

    if -4.6000000000000002e29 < z < 1.7499999999999999e-241

    1. Initial program 92.2%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t} \]
      3. --lowering--.f6477.7

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(y - z\right)} \cdot \frac{x}{t} \]
      5. /-lowering-/.f6481.8

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

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

    if 1.7499999999999999e-241 < z < 9.2e30

    1. Initial program 96.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{t - z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{t - z}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{t - z} \]
      3. --lowering--.f6477.1

        \[\leadsto \frac{x \cdot y}{\color{blue}{t - z}} \]
    5. Simplified77.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-241}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+127}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5000000000000002e171 or 1.74999999999999989e127 < z

    1. Initial program 72.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \frac{y - z}{z}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - \frac{y - z}{z}\right)} \]
      6. div-subN/A

        \[\leadsto x \cdot \left(0 - \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto x \cdot \left(0 - \left(\frac{y}{z} - \color{blue}{1}\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(0 - \frac{y}{z}\right) + 1\right)} \]
      9. neg-sub0N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)} + 1\right) \]
      10. mul-1-negN/A

        \[\leadsto x \cdot \left(\color{blue}{-1 \cdot \frac{y}{z}} + 1\right) \]
      11. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{y}{z}\right)} \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)}\right) \]
      13. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      15. /-lowering-/.f6488.5

        \[\leadsto x \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
    5. Simplified88.5%

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

    if -2.5000000000000002e171 < z < 1.74999999999999989e127

    1. Initial program 93.5%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot \left(y - z\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \frac{x}{\color{blue}{t - z}} \cdot \left(y - z\right) \]
      7. --lowering--.f6490.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+127}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;t \leq -6 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 0.00014:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- y z) t))))
   (if (<= t -6e+54) t_1 (if (<= t 0.00014) (* x (- 1.0 (/ y z))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double tmp;
	if (t <= -6e+54) {
		tmp = t_1;
	} else if (t <= 0.00014) {
		tmp = x * (1.0 - (y / z));
	} 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 - z) / t)
    if (t <= (-6d+54)) then
        tmp = t_1
    else if (t <= 0.00014d0) then
        tmp = x * (1.0d0 - (y / z))
    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 - z) / t);
	double tmp;
	if (t <= -6e+54) {
		tmp = t_1;
	} else if (t <= 0.00014) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y - z) / t)
	tmp = 0
	if t <= -6e+54:
		tmp = t_1
	elif t <= 0.00014:
		tmp = x * (1.0 - (y / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (t <= -6e+54)
		tmp = t_1;
	elseif (t <= 0.00014)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y - z) / t);
	tmp = 0.0;
	if (t <= -6e+54)
		tmp = t_1;
	elseif (t <= 0.00014)
		tmp = x * (1.0 - (y / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+54], t$95$1, If[LessEqual[t, 0.00014], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -6 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 0.00014:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.9999999999999998e54 or 1.3999999999999999e-4 < t

    1. Initial program 87.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t} \]
      3. --lowering--.f6473.0

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y - z}{t} \cdot x} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{y - z}{t} \cdot x} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
      5. --lowering--.f6476.2

        \[\leadsto \frac{\color{blue}{y - z}}{t} \cdot x \]
    7. Applied egg-rr76.2%

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

    if -5.9999999999999998e54 < t < 1.3999999999999999e-4

    1. Initial program 89.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \frac{y - z}{z}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - \frac{y - z}{z}\right)} \]
      6. div-subN/A

        \[\leadsto x \cdot \left(0 - \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto x \cdot \left(0 - \left(\frac{y}{z} - \color{blue}{1}\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(0 - \frac{y}{z}\right) + 1\right)} \]
      9. neg-sub0N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)} + 1\right) \]
      10. mul-1-negN/A

        \[\leadsto x \cdot \left(\color{blue}{-1 \cdot \frac{y}{z}} + 1\right) \]
      11. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{y}{z}\right)} \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)}\right) \]
      13. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      15. /-lowering-/.f6476.0

        \[\leadsto x \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
    5. Simplified76.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+54}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq 0.00014:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.8000000000000003e27 or 1.59999999999999985e-20 < z

    1. Initial program 83.2%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \frac{y - z}{z}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - \frac{y - z}{z}\right)} \]
      6. div-subN/A

        \[\leadsto x \cdot \left(0 - \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto x \cdot \left(0 - \left(\frac{y}{z} - \color{blue}{1}\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(0 - \frac{y}{z}\right) + 1\right)} \]
      9. neg-sub0N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)} + 1\right) \]
      10. mul-1-negN/A

        \[\leadsto x \cdot \left(\color{blue}{-1 \cdot \frac{y}{z}} + 1\right) \]
      11. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{y}{z}\right)} \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)}\right) \]
      13. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      15. /-lowering-/.f6475.3

        \[\leadsto x \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
    5. Simplified75.3%

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

    if -9.8000000000000003e27 < z < 1.59999999999999985e-20

    1. Initial program 93.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
      2. *-lowering-*.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(y - z\right)} \cdot \frac{x}{t} \]
      5. /-lowering-/.f6475.0

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

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 70.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -5.6e-95) t_1 (if (<= z 2.9e-11) (* x (/ y t)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -5.6e-95) {
		tmp = t_1;
	} else if (z <= 2.9e-11) {
		tmp = x * (y / 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 * (1.0d0 - (y / z))
    if (z <= (-5.6d-95)) then
        tmp = t_1
    else if (z <= 2.9d-11) then
        tmp = x * (y / 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 * (1.0 - (y / z));
	double tmp;
	if (z <= -5.6e-95) {
		tmp = t_1;
	} else if (z <= 2.9e-11) {
		tmp = x * (y / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -5.6e-95:
		tmp = t_1
	elif z <= 2.9e-11:
		tmp = x * (y / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -5.6e-95)
		tmp = t_1;
	elseif (z <= 2.9e-11)
		tmp = Float64(x * Float64(y / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -5.6e-95)
		tmp = t_1;
	elseif (z <= 2.9e-11)
		tmp = x * (y / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e-95], t$95$1, If[LessEqual[z, 2.9e-11], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5999999999999998e-95 or 2.9e-11 < z

    1. Initial program 84.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \frac{y - z}{z}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - \frac{y - z}{z}\right)} \]
      6. div-subN/A

        \[\leadsto x \cdot \left(0 - \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto x \cdot \left(0 - \left(\frac{y}{z} - \color{blue}{1}\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto x \cdot \color{blue}{\left(\left(0 - \frac{y}{z}\right) + 1\right)} \]
      9. neg-sub0N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)} + 1\right) \]
      10. mul-1-negN/A

        \[\leadsto x \cdot \left(\color{blue}{-1 \cdot \frac{y}{z}} + 1\right) \]
      11. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{y}{z}\right)} \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z}\right)\right)}\right) \]
      13. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
      15. /-lowering-/.f6470.8

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

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

    if -5.5999999999999998e-95 < z < 2.9e-11

    1. Initial program 94.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y - z}{t - z}} \cdot x \]
      5. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{y - z}}{t - z} \cdot x \]
      6. --lowering--.f6496.1

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

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

      \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
    6. Step-by-step derivation
      1. /-lowering-/.f6473.2

        \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
    7. Simplified73.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{-95}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.39999999999999981e28 or 4.10000000000000005e30 < z

    1. Initial program 81.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Simplified58.9%

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

      if -2.39999999999999981e28 < z < 4.10000000000000005e30

      1. Initial program 94.3%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y - z}{t - z}} \cdot x \]
        5. --lowering--.f64N/A

          \[\leadsto \frac{\color{blue}{y - z}}{t - z} \cdot x \]
        6. --lowering--.f6497.0

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

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

        \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
      6. Step-by-step derivation
        1. /-lowering-/.f6463.9

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

        \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
    5. Recombined 2 regimes into one program.
    6. Final simplification61.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
    7. Add Preprocessing

    Alternative 8: 61.5% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= z -7.3e+28) x (if (<= z 3.1e+30) (* y (/ x t)) x)))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -7.3e+28) {
    		tmp = x;
    	} else if (z <= 3.1e+30) {
    		tmp = y * (x / 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 <= (-7.3d+28)) then
            tmp = x
        else if (z <= 3.1d+30) then
            tmp = y * (x / 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 <= -7.3e+28) {
    		tmp = x;
    	} else if (z <= 3.1e+30) {
    		tmp = y * (x / t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if z <= -7.3e+28:
    		tmp = x
    	elif z <= 3.1e+30:
    		tmp = y * (x / t)
    	else:
    		tmp = x
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (z <= -7.3e+28)
    		tmp = x;
    	elseif (z <= 3.1e+30)
    		tmp = Float64(y * Float64(x / t));
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (z <= -7.3e+28)
    		tmp = x;
    	elseif (z <= 3.1e+30)
    		tmp = y * (x / t);
    	else
    		tmp = x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[z, -7.3e+28], x, If[LessEqual[z, 3.1e+30], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -7.3 \cdot 10^{+28}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;z \leq 3.1 \cdot 10^{+30}:\\
    \;\;\;\;y \cdot \frac{x}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -7.2999999999999998e28 or 3.0999999999999998e30 < z

      1. Initial program 81.4%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified58.9%

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

        if -7.2999999999999998e28 < z < 3.0999999999999998e30

        1. Initial program 94.3%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
          3. *-commutativeN/A

            \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot \left(y - z\right) \]
          6. --lowering--.f64N/A

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

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

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

          \[\leadsto \color{blue}{\frac{x}{t}} \cdot \left(y - z\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6472.5

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

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

          \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
        9. Step-by-step derivation
          1. Simplified62.8%

            \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
        10. Recombined 2 regimes into one program.
        11. Final simplification61.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
        12. Add Preprocessing

        Alternative 9: 36.4% accurate, 23.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 88.1%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x} \]
        4. Step-by-step derivation
          1. Simplified34.4%

            \[\leadsto \color{blue}{x} \]
          2. Add Preprocessing

          Developer Target 1: 97.0% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \frac{x}{\frac{t - z}{y - z}} \end{array} \]
          (FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
          double code(double x, double y, double z, double t) {
          	return x / ((t - z) / (y - 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 / ((t - z) / (y - z))
          end function
          
          public static double code(double x, double y, double z, double t) {
          	return x / ((t - z) / (y - z));
          }
          
          def code(x, y, z, t):
          	return x / ((t - z) / (y - z))
          
          function code(x, y, z, t)
          	return Float64(x / Float64(Float64(t - z) / Float64(y - z)))
          end
          
          function tmp = code(x, y, z, t)
          	tmp = x / ((t - z) / (y - z));
          end
          
          code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{x}{\frac{t - z}{y - z}}
          \end{array}
          

          Reproduce

          ?
          herbie shell --seed 2024196 
          (FPCore (x y z t)
            :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
            :precision binary64
          
            :alt
            (! :herbie-platform default (/ x (/ (- t z) (- y z))))
          
            (/ (* x (- y z)) (- t z)))