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

Percentage Accurate: 83.8% → 97.1%
Time: 9.7s
Alternatives: 11
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 11 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: 83.8% 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.1% 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 84.0%

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

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

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    3. *-commutative96.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. Step-by-step derivation
    1. associate-*r/84.0%

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

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

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

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

Alternative 2: 74.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-x}{\frac{t}{z} + -1}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+20}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+33} \lor \neg \left(z \leq 6.2 \cdot 10^{+113}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2e20 or 4.4000000000000003e-11 < z < 6.7999999999999999e33 or 6.19999999999999982e113 < z

    1. Initial program 71.3%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 58.7%

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

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

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

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

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. *-inverses83.8%

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

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

    if -2e20 < z < 4.4000000000000003e-11

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

    if 6.7999999999999999e33 < z < 6.19999999999999982e113

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 inf 72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+20}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+33} \lor \neg \left(z \leq 6.2 \cdot 10^{+113}\right):\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \end{array} \]

Alternative 3: 74.2% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.8000000000000003e27 or 6.19999999999999982e113 < z

    1. Initial program 68.0%

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

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

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

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

      \[\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*83.8%

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

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

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. *-inverses83.9%

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

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

    if -9.8000000000000003e27 < z < 1.05999999999999993e-11

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

    if 1.05999999999999993e-11 < z < 5.4000000000000002e36

    1. Initial program 100.0%

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

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

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

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

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

    if 5.4000000000000002e36 < z < 6.19999999999999982e113

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 inf 72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+27}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+36}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{t - z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+113}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \end{array} \]

Alternative 4: 61.9% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999987e29 or 6.19999999999999982e113 < z

    1. Initial program 68.0%

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

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

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

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

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

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

    if -1.84999999999999987e29 < z < 2.8499999999999998e-27

    1. Initial program 92.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified62.6%

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

    if 2.8499999999999998e-27 < z < 6.19999999999999982e113

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 inf 64.1%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{z}} \]
      2. neg-mul-149.2%

        \[\leadsto x \cdot \frac{\color{blue}{-y}}{z} \]
    7. Simplified49.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+113}:\\ \;\;\;\;x \cdot \left(-\frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 76.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.5e19 or 2.00000000000000007e-10 < z

    1. Initial program 74.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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. Step-by-step derivation
      1. associate-*r/74.5%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{z} \]
      3. neg-sub053.9%

        \[\leadsto \frac{\color{blue}{0 - x \cdot \left(y - z\right)}}{z} \]
      4. distribute-lft-out--53.0%

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

        \[\leadsto \frac{\color{blue}{\left(0 - x \cdot y\right) + x \cdot z}}{z} \]
      6. neg-sub053.0%

        \[\leadsto \frac{\color{blue}{\left(-x \cdot y\right)} + x \cdot z}{z} \]
      7. mul-1-neg53.0%

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

        \[\leadsto \frac{\color{blue}{x \cdot z + -1 \cdot \left(x \cdot y\right)}}{z} \]
      9. mul-1-neg53.0%

        \[\leadsto \frac{x \cdot z + \color{blue}{\left(-x \cdot y\right)}}{z} \]
      10. sub-neg53.0%

        \[\leadsto \frac{\color{blue}{x \cdot z - x \cdot y}}{z} \]
      11. distribute-lft-out--53.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{z - y}}} \]
    8. Simplified74.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{z - y}}} \]
    9. Step-by-step derivation
      1. clear-num74.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{z}{z - y}}{x}}} \]
      2. associate-/r/74.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{z - y}} \cdot x} \]
      3. clear-num74.7%

        \[\leadsto \color{blue}{\frac{z - y}{z}} \cdot x \]
      4. div-sub74.7%

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

        \[\leadsto \left(\color{blue}{1} - \frac{y}{z}\right) \cdot x \]
    10. Applied egg-rr74.7%

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

    if -9.5e19 < z < 2.00000000000000007e-10

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 69.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.70000000000000016e30 or 2e114 < z

    1. Initial program 68.0%

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

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

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

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

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

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

    if -3.70000000000000016e30 < z < 2e114

    1. Initial program 93.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+114}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 76.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 69.3%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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. Step-by-step derivation
      1. associate-*r/69.3%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{z} \]
      3. neg-sub050.9%

        \[\leadsto \frac{\color{blue}{0 - x \cdot \left(y - z\right)}}{z} \]
      4. distribute-lft-out--49.3%

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

        \[\leadsto \frac{\color{blue}{\left(0 - x \cdot y\right) + x \cdot z}}{z} \]
      6. neg-sub049.3%

        \[\leadsto \frac{\color{blue}{\left(-x \cdot y\right)} + x \cdot z}{z} \]
      7. mul-1-neg49.3%

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

        \[\leadsto \frac{\color{blue}{x \cdot z + -1 \cdot \left(x \cdot y\right)}}{z} \]
      9. mul-1-neg49.3%

        \[\leadsto \frac{x \cdot z + \color{blue}{\left(-x \cdot y\right)}}{z} \]
      10. sub-neg49.3%

        \[\leadsto \frac{\color{blue}{x \cdot z - x \cdot y}}{z} \]
      11. distribute-lft-out--50.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{z - y}}} \]
    8. Simplified75.5%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{z - y}}} \]
    9. Step-by-step derivation
      1. clear-num75.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{z}{z - y}}{x}}} \]
      2. associate-/r/75.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{z - y}} \cdot x} \]
      3. clear-num75.5%

        \[\leadsto \color{blue}{\frac{z - y}{z}} \cdot x \]
      4. div-sub75.5%

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

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

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

    if -4.4999999999999998e22 < z < 3.2000000000000001e-12

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

    if 3.2000000000000001e-12 < z

    1. Initial program 79.8%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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. Step-by-step derivation
      1. associate-*r/79.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{z} \]
      3. neg-sub056.9%

        \[\leadsto \frac{\color{blue}{0 - x \cdot \left(y - z\right)}}{z} \]
      4. distribute-lft-out--56.8%

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

        \[\leadsto \frac{\color{blue}{\left(0 - x \cdot y\right) + x \cdot z}}{z} \]
      6. neg-sub056.8%

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

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

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

        \[\leadsto \frac{x \cdot z + \color{blue}{\left(-x \cdot y\right)}}{z} \]
      10. sub-neg56.8%

        \[\leadsto \frac{\color{blue}{x \cdot z - x \cdot y}}{z} \]
      11. distribute-lft-out--56.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{z - y}}} \]
    8. Simplified73.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+22}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \end{array} \]

Alternative 8: 62.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.45e21 or 2.6000000000000001e-11 < z

    1. Initial program 74.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 z around inf 56.8%

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

    if -4.45e21 < z < 2.6000000000000001e-11

    1. Initial program 92.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.45 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 62.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.7000000000000004e27 or 1.8e-12 < z

    1. Initial program 74.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 z around inf 56.8%

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

    if -8.7000000000000004e27 < z < 1.8e-12

    1. Initial program 92.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.7 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 97.1% 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 84.0%

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

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

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    3. *-commutative96.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 11: 35.6% accurate, 9.0× speedup?

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

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

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

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

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    3. *-commutative96.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 32.8%

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

    \[\leadsto x \]

Developer target: 97.1% 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 2023322 
(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)))