Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D

Percentage Accurate: 92.0% → 95.7%
Time: 9.1s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 92.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.7% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 98.4%

      \[x + \frac{y \cdot \left(z - x\right)}{t} \]
    2. Add Preprocessing

    if 2e297 < (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t))

    1. Initial program 77.8%

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

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

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

        \[\leadsto x + \left(\left(-\color{blue}{x \cdot \frac{y}{t}}\right) + \frac{y \cdot z}{t}\right) \]
      3. distribute-lft-neg-in75.4%

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

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

        \[\leadsto x + \left(\left(-x\right) \cdot \frac{y}{t} + \color{blue}{z \cdot \frac{y}{t}}\right) \]
      6. distribute-rgt-in100.0%

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

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

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

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

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

Alternative 2: 53.6% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+14}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.40000000000000002e73 or 1.2e14 < t

    1. Initial program 85.7%

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

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

    if -2.40000000000000002e73 < t < -2.09999999999999984e-154

    1. Initial program 99.8%

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

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

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

    if -2.09999999999999984e-154 < t < 3.09999999999999984e-151

    1. Initial program 99.9%

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

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

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

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

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

    if 3.09999999999999984e-151 < t < 1.2e14

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. clear-num59.3%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    9. Step-by-step derivation
      1. associate-/r/63.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-154}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-151}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 54.0% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+15}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.80000000000000008e73 or 1.65e15 < t

    1. Initial program 85.7%

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

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

    if -2.80000000000000008e73 < t < -1.0999999999999999e-206

    1. Initial program 99.8%

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

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

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

    if -1.0999999999999999e-206 < t < 2.8999999999999998e-150

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    5. Step-by-step derivation
      1. mul-1-neg65.0%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{t}} \]
      3. distribute-rgt-neg-in65.0%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{t}\right)} \]
      4. mul-1-neg65.0%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
      5. associate-*r/65.0%

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      6. mul-1-neg65.0%

        \[\leadsto x \cdot \frac{\color{blue}{-y}}{t} \]
    6. Simplified65.0%

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

    if 2.8999999999999998e-150 < t < 1.65e15

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. clear-num59.3%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    9. Step-by-step derivation
      1. associate-/r/63.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-206}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \frac{-y}{t}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+15}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+47} \lor \neg \left(t \leq 5 \cdot 10^{-32}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.79999999999999961e47 or 5e-32 < t

    1. Initial program 88.5%

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

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

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

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

    if -5.79999999999999961e47 < t < 5e-32

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+47} \lor \neg \left(t \leq 5 \cdot 10^{-32}\right):\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(z - x\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 4 \cdot 10^{-27}\right):\\
\;\;\;\;y \cdot \frac{z - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1 or 4.0000000000000002e-27 < y

    1. Initial program 89.7%

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

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

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

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

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

    if -1 < y < 4.0000000000000002e-27

    1. Initial program 99.9%

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

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

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

Alternative 6: 83.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \lor \neg \left(y \leq 4.5 \cdot 10^{-27}\right):\\
\;\;\;\;y \cdot \frac{z - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.5 or 4.5000000000000002e-27 < y

    1. Initial program 89.7%

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

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

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

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

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

    if -4.5 < y < 4.5000000000000002e-27

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\left(-x\right) \cdot \frac{y}{t}} + \frac{y \cdot z}{t}\right) \]
      4. *-commutative99.0%

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

        \[\leadsto x + \left(\left(-x\right) \cdot \frac{y}{t} + \color{blue}{z \cdot \frac{y}{t}}\right) \]
      6. distribute-rgt-in97.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \lor \neg \left(y \leq 4.5 \cdot 10^{-27}\right):\\ \;\;\;\;y \cdot \frac{z - x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \lor \neg \left(y \leq 2.8 \cdot 10^{-28}\right):\\
\;\;\;\;y \cdot \frac{z - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.7999999999999998 or 2.7999999999999998e-28 < y

    1. Initial program 89.7%

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

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

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

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

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

    if -3.7999999999999998 < y < 2.7999999999999998e-28

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \lor \neg \left(y \leq 2.8 \cdot 10^{-28}\right):\\ \;\;\;\;y \cdot \frac{z - x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2600000 \lor \neg \left(y \leq 1.45 \cdot 10^{-27}\right):\\
\;\;\;\;y \cdot \frac{z - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e6 or 1.45000000000000002e-27 < y

    1. Initial program 89.7%

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

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

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

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

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

    if -2.6e6 < y < 1.45000000000000002e-27

    1. Initial program 99.9%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{t}\right)}\right) \]
      2. unsub-neg73.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2600000 \lor \neg \left(y \leq 1.45 \cdot 10^{-27}\right):\\ \;\;\;\;y \cdot \frac{z - x}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{-57} \lor \neg \left(x \leq 4.1 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.09999999999999976e-57 or 4.0999999999999997e-67 < x

    1. Initial program 94.6%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{t}\right)}\right) \]
      2. unsub-neg82.4%

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

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

    if -3.09999999999999976e-57 < x < 4.0999999999999997e-67

    1. Initial program 93.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{-57} \lor \neg \left(x \leq 4.1 \cdot 10^{-67}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.84 \lor \neg \left(y \leq 7.6 \cdot 10^{-26}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.839999999999999969 or 7.60000000000000029e-26 < y

    1. Initial program 89.7%

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

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

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

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

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

    if -0.839999999999999969 < y < 7.60000000000000029e-26

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.84 \lor \neg \left(y \leq 7.6 \cdot 10^{-26}\right):\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{y \cdot z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2000000000000001e73 or 8.5e14 < t

    1. Initial program 85.7%

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

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

    if -5.2000000000000001e73 < t < 8.5e14

    1. Initial program 99.9%

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

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

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

Alternative 12: 54.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 4800000000000:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.23999999999999995e73 or 4.8e12 < t

    1. Initial program 85.7%

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

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

    if -1.23999999999999995e73 < t < 4.8e12

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. clear-num48.2%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    9. Step-by-step derivation
      1. associate-/r/52.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.24 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4800000000000:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 97.8% accurate, 1.0× speedup?

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

\\
x + \left(z - x\right) \cdot \frac{y}{t}
\end{array}
Derivation
  1. Initial program 94.3%

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

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

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

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

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

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

      \[\leadsto x + \left(\left(-x\right) \cdot \frac{y}{t} + \color{blue}{z \cdot \frac{y}{t}}\right) \]
    6. distribute-rgt-in96.0%

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

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

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

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

    \[\leadsto x + \left(z - x\right) \cdot \frac{y}{t} \]
  7. Add Preprocessing

Alternative 14: 38.3% 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 94.3%

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

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

Developer Target 1: 90.7% accurate, 0.6× speedup?

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

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

Reproduce

?
herbie shell --seed 2024144 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

  :alt
  (! :herbie-platform default (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))

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