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

Percentage Accurate: 84.6% → 97.2%
Time: 9.6s
Alternatives: 12
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 12 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.6% 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.2% accurate, 1.0× 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}
Derivation
  1. Initial program 82.8%

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

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

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

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

Alternative 2: 73.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 -3.8 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -110000:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 34:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -3.8e+86)
     t_1
     (if (<= z -110000.0)
       (/ (- y z) (/ t x))
       (if (<= z -2.15e-82)
         t_1
         (if (<= z 34.0) (/ x (/ (- t z) y)) (/ (- x) (+ (/ t z) -1.0))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -3.8e+86) {
		tmp = t_1;
	} else if (z <= -110000.0) {
		tmp = (y - z) / (t / x);
	} else if (z <= -2.15e-82) {
		tmp = t_1;
	} else if (z <= 34.0) {
		tmp = x / ((t - z) / y);
	} else {
		tmp = -x / ((t / z) + -1.0);
	}
	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 <= (-3.8d+86)) then
        tmp = t_1
    else if (z <= (-110000.0d0)) then
        tmp = (y - z) / (t / x)
    else if (z <= (-2.15d-82)) then
        tmp = t_1
    else if (z <= 34.0d0) then
        tmp = x / ((t - z) / y)
    else
        tmp = -x / ((t / z) + (-1.0d0))
    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 <= -3.8e+86) {
		tmp = t_1;
	} else if (z <= -110000.0) {
		tmp = (y - z) / (t / x);
	} else if (z <= -2.15e-82) {
		tmp = t_1;
	} else if (z <= 34.0) {
		tmp = x / ((t - z) / y);
	} else {
		tmp = -x / ((t / z) + -1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -3.8e+86:
		tmp = t_1
	elif z <= -110000.0:
		tmp = (y - z) / (t / x)
	elif z <= -2.15e-82:
		tmp = t_1
	elif z <= 34.0:
		tmp = x / ((t - z) / y)
	else:
		tmp = -x / ((t / z) + -1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -3.8e+86)
		tmp = t_1;
	elseif (z <= -110000.0)
		tmp = Float64(Float64(y - z) / Float64(t / x));
	elseif (z <= -2.15e-82)
		tmp = t_1;
	elseif (z <= 34.0)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	else
		tmp = Float64(Float64(-x) / Float64(Float64(t / z) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -3.8e+86)
		tmp = t_1;
	elseif (z <= -110000.0)
		tmp = (y - z) / (t / x);
	elseif (z <= -2.15e-82)
		tmp = t_1;
	elseif (z <= 34.0)
		tmp = x / ((t - z) / y);
	else
		tmp = -x / ((t / z) + -1.0);
	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, -3.8e+86], t$95$1, If[LessEqual[z, -110000.0], N[(N[(y - z), $MachinePrecision] / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-82], t$95$1, If[LessEqual[z, 34.0], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -110000:\\
\;\;\;\;\frac{y - z}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq -2.15 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 34:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.79999999999999978e86 or -1.1e5 < z < -2.15000000000000009e-82

    1. Initial program 86.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub98.1%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{z}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg77.5%

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

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

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

    if -3.79999999999999978e86 < z < -1.1e5

    1. Initial program 74.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
    5. Applied egg-rr94.8%

      \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
    6. Taylor expanded in t around inf 73.5%

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

    if -2.15000000000000009e-82 < z < 34

    1. Initial program 89.8%

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

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

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

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

    if 34 < z

    1. Initial program 72.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t - z}{z}}} \]
      3. distribute-neg-frac78.0%

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub78.1%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. sub-neg78.1%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} + \left(-\frac{z}{z}\right)}} \]
      6. *-inverses78.1%

        \[\leadsto \frac{-x}{\frac{t}{z} + \left(-\color{blue}{1}\right)} \]
      7. metadata-eval78.1%

        \[\leadsto \frac{-x}{\frac{t}{z} + \color{blue}{-1}} \]
    6. Simplified78.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -110000:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 34:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \end{array} \]

Alternative 3: 73.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-x}{\frac{z}{y - z}}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -26000:\\
\;\;\;\;\frac{y - z}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-78}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 0.28:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.2999999999999999e86 or -26000 < z < -4.2000000000000001e-78

    1. Initial program 86.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    5. Step-by-step derivation
      1. mul-1-neg67.1%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac77.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified77.2%

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

    if -3.2999999999999999e86 < z < -26000

    1. Initial program 74.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
    5. Applied egg-rr94.8%

      \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
    6. Taylor expanded in t around inf 73.5%

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

    if -4.2000000000000001e-78 < z < 0.28000000000000003

    1. Initial program 89.8%

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

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

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

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

    if 0.28000000000000003 < z

    1. Initial program 72.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t - z}{z}}} \]
      3. distribute-neg-frac78.0%

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub78.1%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. sub-neg78.1%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} + \left(-\frac{z}{z}\right)}} \]
      6. *-inverses78.1%

        \[\leadsto \frac{-x}{\frac{t}{z} + \left(-\color{blue}{1}\right)} \]
      7. metadata-eval78.1%

        \[\leadsto \frac{-x}{\frac{t}{z} + \color{blue}{-1}} \]
    6. Simplified78.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+86}:\\ \;\;\;\;\frac{-x}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -26000:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-78}:\\ \;\;\;\;\frac{-x}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq 0.28:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \end{array} \]

Alternative 4: 74.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -220000:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-78} \lor \neg \left(z \leq 1.48 \cdot 10^{-24}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -3.4e+86)
     t_1
     (if (<= z -220000.0)
       (* (- y z) (/ x t))
       (if (or (<= z -3.9e-78) (not (<= z 1.48e-24)))
         t_1
         (* x (/ y (- t z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -3.4e+86) {
		tmp = t_1;
	} else if (z <= -220000.0) {
		tmp = (y - z) * (x / t);
	} else if ((z <= -3.9e-78) || !(z <= 1.48e-24)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    if (z <= (-3.4d+86)) then
        tmp = t_1
    else if (z <= (-220000.0d0)) then
        tmp = (y - z) * (x / t)
    else if ((z <= (-3.9d-78)) .or. (.not. (z <= 1.48d-24))) then
        tmp = t_1
    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 t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -3.4e+86) {
		tmp = t_1;
	} else if (z <= -220000.0) {
		tmp = (y - z) * (x / t);
	} else if ((z <= -3.9e-78) || !(z <= 1.48e-24)) {
		tmp = t_1;
	} else {
		tmp = x * (y / (t - z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -3.4e+86:
		tmp = t_1
	elif z <= -220000.0:
		tmp = (y - z) * (x / t)
	elif (z <= -3.9e-78) or not (z <= 1.48e-24):
		tmp = t_1
	else:
		tmp = x * (y / (t - z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -3.4e+86)
		tmp = t_1;
	elseif (z <= -220000.0)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif ((z <= -3.9e-78) || !(z <= 1.48e-24))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(y / Float64(t - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -3.4e+86)
		tmp = t_1;
	elseif (z <= -220000.0)
		tmp = (y - z) * (x / t);
	elseif ((z <= -3.9e-78) || ~((z <= 1.48e-24)))
		tmp = t_1;
	else
		tmp = x * (y / (t - z));
	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, -3.4e+86], t$95$1, If[LessEqual[z, -220000.0], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.9e-78], N[Not[LessEqual[z, 1.48e-24]], $MachinePrecision]], t$95$1, N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-78} \lor \neg \left(z \leq 1.48 \cdot 10^{-24}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.3999999999999998e86 or -2.2e5 < z < -3.9000000000000002e-78 or 1.48000000000000003e-24 < z

    1. Initial program 78.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub99.0%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{z}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg74.6%

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

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

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

    if -3.3999999999999998e86 < z < -2.2e5

    1. Initial program 74.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot \left(y - z\right)\right) \cdot \frac{1}{t}} \]
      2. *-commutative57.8%

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

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

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

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

    if -3.9000000000000002e-78 < z < 1.48000000000000003e-24

    1. Initial program 89.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -220000:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-78} \lor \neg \left(z \leq 1.48 \cdot 10^{-24}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \]

Alternative 5: 72.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := \frac{x}{\frac{t}{y - z}}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-62}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))) (t_2 (/ x (/ t (- y z)))))
   (if (<= t -1.6e+71)
     t_2
     (if (<= t 8.5e-125)
       t_1
       (if (<= t 2.2e-62) (* x (/ y (- t z))) (if (<= t 5e+74) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double t_2 = x / (t / (y - z));
	double tmp;
	if (t <= -1.6e+71) {
		tmp = t_2;
	} else if (t <= 8.5e-125) {
		tmp = t_1;
	} else if (t <= 2.2e-62) {
		tmp = x * (y / (t - z));
	} else if (t <= 5e+74) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    t_2 = x / (t / (y - z))
    if (t <= (-1.6d+71)) then
        tmp = t_2
    else if (t <= 8.5d-125) then
        tmp = t_1
    else if (t <= 2.2d-62) then
        tmp = x * (y / (t - z))
    else if (t <= 5d+74) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = x / (t / (y - z));
	double tmp;
	if (t <= -1.6e+71) {
		tmp = t_2;
	} else if (t <= 8.5e-125) {
		tmp = t_1;
	} else if (t <= 2.2e-62) {
		tmp = x * (y / (t - z));
	} else if (t <= 5e+74) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	t_2 = x / (t / (y - z))
	tmp = 0
	if t <= -1.6e+71:
		tmp = t_2
	elif t <= 8.5e-125:
		tmp = t_1
	elif t <= 2.2e-62:
		tmp = x * (y / (t - z))
	elif t <= 5e+74:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x / Float64(t / Float64(y - z)))
	tmp = 0.0
	if (t <= -1.6e+71)
		tmp = t_2;
	elseif (t <= 8.5e-125)
		tmp = t_1;
	elseif (t <= 2.2e-62)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (t <= 5e+74)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	t_2 = x / (t / (y - z));
	tmp = 0.0;
	if (t <= -1.6e+71)
		tmp = t_2;
	elseif (t <= 8.5e-125)
		tmp = t_1;
	elseif (t <= 2.2e-62)
		tmp = x * (y / (t - z));
	elseif (t <= 5e+74)
		tmp = t_1;
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+71], t$95$2, If[LessEqual[t, 8.5e-125], t$95$1, If[LessEqual[t, 2.2e-62], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+74], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.60000000000000012e71 or 4.99999999999999963e74 < t

    1. Initial program 76.8%

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

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

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

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

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

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

    if -1.60000000000000012e71 < t < 8.5000000000000002e-125 or 2.20000000000000017e-62 < t < 4.99999999999999963e74

    1. Initial program 86.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub96.5%

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{z}\right)}\right) \]
      2. sub-neg76.7%

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

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

    if 8.5000000000000002e-125 < t < 2.20000000000000017e-62

    1. Initial program 92.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-62}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \end{array} \]

Alternative 6: 72.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := \frac{x}{\frac{t}{y - z}}\\ \mathbf{if}\;t \leq -2 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))) (t_2 (/ x (/ t (- y z)))))
   (if (<= t -2e+69)
     t_2
     (if (<= t 8.5e-125)
       t_1
       (if (<= t 9.5e-67) (/ x (/ (- t z) y)) (if (<= t 2e+73) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double t_2 = x / (t / (y - z));
	double tmp;
	if (t <= -2e+69) {
		tmp = t_2;
	} else if (t <= 8.5e-125) {
		tmp = t_1;
	} else if (t <= 9.5e-67) {
		tmp = x / ((t - z) / y);
	} else if (t <= 2e+73) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    t_2 = x / (t / (y - z))
    if (t <= (-2d+69)) then
        tmp = t_2
    else if (t <= 8.5d-125) then
        tmp = t_1
    else if (t <= 9.5d-67) then
        tmp = x / ((t - z) / y)
    else if (t <= 2d+73) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = x / (t / (y - z));
	double tmp;
	if (t <= -2e+69) {
		tmp = t_2;
	} else if (t <= 8.5e-125) {
		tmp = t_1;
	} else if (t <= 9.5e-67) {
		tmp = x / ((t - z) / y);
	} else if (t <= 2e+73) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	t_2 = x / (t / (y - z))
	tmp = 0
	if t <= -2e+69:
		tmp = t_2
	elif t <= 8.5e-125:
		tmp = t_1
	elif t <= 9.5e-67:
		tmp = x / ((t - z) / y)
	elif t <= 2e+73:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x / Float64(t / Float64(y - z)))
	tmp = 0.0
	if (t <= -2e+69)
		tmp = t_2;
	elseif (t <= 8.5e-125)
		tmp = t_1;
	elseif (t <= 9.5e-67)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	elseif (t <= 2e+73)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	t_2 = x / (t / (y - z));
	tmp = 0.0;
	if (t <= -2e+69)
		tmp = t_2;
	elseif (t <= 8.5e-125)
		tmp = t_1;
	elseif (t <= 9.5e-67)
		tmp = x / ((t - z) / y);
	elseif (t <= 2e+73)
		tmp = t_1;
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+69], t$95$2, If[LessEqual[t, 8.5e-125], t$95$1, If[LessEqual[t, 9.5e-67], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0000000000000001e69 or 1.99999999999999997e73 < t

    1. Initial program 76.8%

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

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

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

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

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

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

    if -2.0000000000000001e69 < t < 8.5000000000000002e-125 or 9.4999999999999994e-67 < t < 1.99999999999999997e73

    1. Initial program 86.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub96.5%

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{z}\right)}\right) \]
      2. sub-neg76.7%

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

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

    if 8.5000000000000002e-125 < t < 9.4999999999999994e-67

    1. Initial program 92.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+69}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \end{array} \]

Alternative 7: 60.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -0.085:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.85000000000000026e86 or -0.0850000000000000061 < z < -4.2000000000000001e-78 or 6.39999999999999975e-22 < z

    1. Initial program 78.5%

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

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

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

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

    if -3.85000000000000026e86 < z < -0.0850000000000000061

    1. Initial program 76.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg37.9%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{z}}} \]
      3. distribute-neg-frac50.7%

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

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

    if -4.2000000000000001e-78 < z < 6.39999999999999975e-22

    1. Initial program 89.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.85 \cdot 10^{+86}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -0.085:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-78}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-22}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 69.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-100} \lor \neg \left(z \leq 1.06 \cdot 10^{-77}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.20000000000000019e-100 or 1.05999999999999991e-77 < z

    1. Initial program 79.6%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub98.6%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{z}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg68.2%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{z}\right)}\right) \]
      2. sub-neg68.2%

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

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

    if -4.20000000000000019e-100 < z < 1.05999999999999991e-77

    1. Initial program 89.5%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
      2. associate-/r/73.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
      2. clear-num73.0%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      3. un-div-inv73.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    10. Applied egg-rr73.7%

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

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

Alternative 9: 75.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-78} \lor \neg \left(z \leq 2.32 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000001e-78 or 2.3199999999999999e-23 < z

    1. Initial program 78.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Step-by-step derivation
      1. div-sub99.1%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{z}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg69.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{z}\right)}\right) \]
      2. sub-neg69.4%

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

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

    if -4.2000000000000001e-78 < z < 2.3199999999999999e-23

    1. Initial program 89.6%

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

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

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

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

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

Alternative 10: 60.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-78}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000001e-78 or 1.55e-24 < z

    1. Initial program 78.3%

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

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

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

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

    if -4.2000000000000001e-78 < z < 1.55e-24

    1. Initial program 89.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-78}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 97.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{y - z}{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(x * Float64(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[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

Alternative 12: 35.2% 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 82.8%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification36.0%

    \[\leadsto x \]

Developer target: 97.2% accurate, 1.0× 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 2023312 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

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