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

Percentage Accurate: 92.9% → 98.0%
Time: 9.8s
Alternatives: 17
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 17 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.9% 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: 98.0% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{z - x}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.1000000000000001e-46

    1. Initial program 96.7%

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

      \[\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-neg95.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z - x}{t}} \]
      2. *-commutative86.3%

        \[\leadsto x + \color{blue}{\frac{z - x}{t} \cdot y} \]
      3. associate-/r/97.2%

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

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

    if 3.1000000000000001e-46 < y

    1. Initial program 89.9%

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

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

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

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

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

Alternative 2: 73.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-59} \lor \neg \left(x \leq 1.35 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.80000000000000033e-59 or 1.34999999999999994e-89 < x

    1. Initial program 93.0%

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

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

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

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

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

    if -5.80000000000000033e-59 < x < 1.34999999999999994e-89

    1. Initial program 96.5%

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

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

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

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

Alternative 3: 83.9% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.50000000000000007e-104

    1. Initial program 88.3%

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

      \[\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-neg88.2%

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000007e-104 < t < 1.02e-100

    1. Initial program 98.3%

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

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

    if 1.02e-100 < t

    1. Initial program 95.3%

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

      \[\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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.1%

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

Alternative 4: 82.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.7e-43

    1. Initial program 93.6%

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

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

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

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

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

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

    if -3.7e-43 < x < 3.09999999999999991e113

    1. Initial program 95.4%

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

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

    if 3.09999999999999991e113 < x

    1. Initial program 92.8%

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

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

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

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

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

Alternative 5: 84.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.39999999999999994e-43

    1. Initial program 93.6%

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

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

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

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

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

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

    if -4.39999999999999994e-43 < x < 9.5000000000000001e113

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - x}{t} \cdot y} \]
      3. associate-/r/91.9%

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

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

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

    if 9.5000000000000001e113 < x

    1. Initial program 92.8%

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

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

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

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

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

Alternative 6: 84.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.7e-43

    1. Initial program 93.6%

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

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

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

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

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

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

    if -3.7e-43 < x < 3e113

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

    if 3e113 < x

    1. Initial program 92.8%

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

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

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

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

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

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

Alternative 7: 82.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.2000000000000001e-43

    1. Initial program 93.6%

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

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

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

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

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

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

    if -4.2000000000000001e-43 < x < 3.5000000000000001e113

    1. Initial program 95.4%

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

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

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

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

    if 3.5000000000000001e113 < x

    1. Initial program 92.8%

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

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

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

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

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

Alternative 8: 76.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.80000000000000059e-39

    1. Initial program 93.3%

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

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

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

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

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

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

    if -7.80000000000000059e-39 < x < 270

    1. Initial program 96.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t} + \frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. mul-1-neg96.3%

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

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

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

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

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

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

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

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

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

    if 270 < 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 84.4%

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

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

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

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

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

Alternative 9: 73.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-59}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.19999999999999993e-59

    1. Initial program 93.8%

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

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

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

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

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

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

    if -4.19999999999999993e-59 < x < 2.20000000000000005e-88

    1. Initial program 96.5%

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

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

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

    if 2.20000000000000005e-88 < x

    1. Initial program 92.2%

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

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

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

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

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

Alternative 10: 50.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-42}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.80000000000000017e-42 or 190 < x

    1. Initial program 92.8%

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

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

    if -3.80000000000000017e-42 < x < 190

    1. Initial program 96.2%

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

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

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

Alternative 11: 51.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-41}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3e-41 or 940 < x

    1. Initial program 92.8%

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

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

    if -1.3e-41 < x < 940

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t} + \frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. mul-1-neg96.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y}{t} \cdot \color{blue}{z} \]
    8. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
      2. clear-num66.3%

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      3. div-inv66.5%

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

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

Alternative 12: 51.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.8999999999999999e-40 or 12500 < x

    1. Initial program 92.8%

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

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

    if -1.8999999999999999e-40 < x < 12500

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t} + \frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. mul-1-neg96.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 50.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-41}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.50000000000000022e-41 or 78 < x

    1. Initial program 92.8%

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

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

    if -5.50000000000000022e-41 < x < 78

    1. Initial program 96.2%

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

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

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

Alternative 14: 95.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+100}:\\
\;\;\;\;x + \frac{z - x}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0499999999999999e100

    1. Initial program 77.6%

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

      \[\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-neg77.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z - x}{t}} \]
      2. *-commutative96.4%

        \[\leadsto x + \color{blue}{\frac{z - x}{t} \cdot y} \]
      3. associate-/r/100.0%

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

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

    if -1.0499999999999999e100 < t

    1. Initial program 97.4%

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

Alternative 15: 95.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.20000000000000077e99

    1. Initial program 77.6%

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

      \[\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-neg77.4%

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

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

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

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

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

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

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

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

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

    if -9.20000000000000077e99 < t

    1. Initial program 97.4%

      \[x + \frac{y \cdot \left(z - x\right)}{t} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification97.8%

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

Alternative 16: 97.6% 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.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 37.7% 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.5%

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

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

Developer Target 1: 90.8% 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 2024139 
(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)))