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

Percentage Accurate: 92.6% → 96.9%
Time: 9.8s
Alternatives: 13
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 13 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.6% 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: 96.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-186}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - x}{t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - x}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -3.4e-186) (fma y (/ (- z x) t) x) (+ x (/ (- z x) (/ t y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -3.4e-186) {
		tmp = fma(y, ((z - x) / t), x);
	} else {
		tmp = x + ((z - x) / (t / y));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -3.4e-186)
		tmp = fma(y, Float64(Float64(z - x) / t), x);
	else
		tmp = Float64(x + Float64(Float64(z - x) / Float64(t / y)));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.4e-186], N[(y * N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(z - x), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-186}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - x}{t}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3999999999999999e-186

    1. Initial program 93.6%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - x}{t}, x\right)} \]
    3. Simplified98.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - x}{t}, x\right)} \]
    4. Add Preprocessing

    if -3.3999999999999999e-186 < t

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - x}{\frac{t}{y}}} \]
    7. Applied egg-rr99.3%

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

Alternative 2: 80.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+139}:\\
\;\;\;\;x - \frac{x}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.06e72 or 3.1e139 < y

    1. Initial program 91.0%

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

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

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

    if -1.06e72 < y < 2.8e-210

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8e-210 < y < 3.1e139

    1. Initial program 92.0%

      \[x + \frac{y \cdot \left(z - x\right)}{t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 92.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. +-commutative92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot x}}{\frac{t}{y}} \]
    9. Step-by-step derivation
      1. neg-mul-181.4%

        \[\leadsto x + \frac{\color{blue}{-x}}{\frac{t}{y}} \]
    10. Simplified81.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+72}:\\ \;\;\;\;y \cdot \frac{z - x}{t}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-210}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+139}:\\ \;\;\;\;x - \frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 80.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq 8 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999996e70 or 8.00000000000000026e139 < y

    1. Initial program 91.0%

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

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

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

    if -8.4999999999999996e70 < y < 2.69999999999999992e-210

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999992e-210 < y < 8.00000000000000026e139

    1. Initial program 92.0%

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

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

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

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

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

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

Alternative 4: 78.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.45000000000000004e71 or 1.4499999999999999e140 < y

    1. Initial program 91.0%

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

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

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

    if -1.45000000000000004e71 < y < 5.6000000000000003e-223

    1. Initial program 95.6%

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

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

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

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

    if 5.6000000000000003e-223 < y < 1.4499999999999999e140

    1. Initial program 91.1%

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

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

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

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

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

Alternative 5: 75.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{-135} \lor \neg \left(x \leq 3.6 \cdot 10^{+72}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.12e-135 or 3.60000000000000035e72 < x

    1. Initial program 92.0%

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

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

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

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

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

    if -1.12e-135 < x < 3.60000000000000035e72

    1. Initial program 93.3%

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

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

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

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

Alternative 6: 74.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-139} \lor \neg \left(x \leq 6.5 \cdot 10^{-127}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000006e-139 or 6.49999999999999998e-127 < x

    1. Initial program 92.3%

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

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

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

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

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

    if -9.5000000000000006e-139 < x < 6.49999999999999998e-127

    1. Initial program 93.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr67.6%

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

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

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

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

Alternative 7: 52.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.25 \cdot 10^{-105}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+96}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.25000000000000003e-105

    1. Initial program 94.2%

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

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

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

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

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

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

    if -3.25000000000000003e-105 < y < 6.9999999999999998e96

    1. Initial program 92.9%

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

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

    if 6.9999999999999998e96 < y

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+46} \lor \neg \left(y \leq 7 \cdot 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.5000000000000001e46 or 6.9999999999999998e96 < y

    1. Initial program 90.8%

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

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

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

    if -2.5000000000000001e46 < y < 6.9999999999999998e96

    1. Initial program 94.0%

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

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

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

Alternative 9: 55.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.20000000000000009e38 or 2.6e70 < t

    1. Initial program 88.1%

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

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

    if -1.20000000000000009e38 < t < 2.6e70

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 10: 55.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.7999999999999997e37 or 8.5000000000000002e69 < t

    1. Initial program 88.1%

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

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

    if -7.7999999999999997e37 < t < 8.5000000000000002e69

    1. Initial program 95.7%

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

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

      \[\leadsto y \cdot \color{blue}{\frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num47.0%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr47.3%

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

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

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

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

Alternative 11: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 38.2% accurate, 9.0× speedup?

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

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

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

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

Developer Target 1: 91.0% 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 2024165 
(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)))