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

Percentage Accurate: 92.4% → 97.8%
Time: 8.7s
Alternatives: 10
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 10 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.4% 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: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

      \[\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. Final simplification98.1%

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

Alternative 2: 52.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.9 \cdot 10^{-25}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{elif}\;x \leq 8.1 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{-t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -7.2e+92)
   x
   (if (<= x -5.4e+74)
     (* y (/ z t))
     (if (<= x -2.8e-68)
       x
       (if (<= x 7.9e-25)
         (* (/ y t) z)
         (if (<= x 8.1e+191) x (* x (/ y (- t)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -7.2e+92) {
		tmp = x;
	} else if (x <= -5.4e+74) {
		tmp = y * (z / t);
	} else if (x <= -2.8e-68) {
		tmp = x;
	} else if (x <= 7.9e-25) {
		tmp = (y / t) * z;
	} else if (x <= 8.1e+191) {
		tmp = x;
	} else {
		tmp = x * (y / -t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-7.2d+92)) then
        tmp = x
    else if (x <= (-5.4d+74)) then
        tmp = y * (z / t)
    else if (x <= (-2.8d-68)) then
        tmp = x
    else if (x <= 7.9d-25) then
        tmp = (y / t) * z
    else if (x <= 8.1d+191) then
        tmp = x
    else
        tmp = x * (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.2e+92) {
		tmp = x;
	} else if (x <= -5.4e+74) {
		tmp = y * (z / t);
	} else if (x <= -2.8e-68) {
		tmp = x;
	} else if (x <= 7.9e-25) {
		tmp = (y / t) * z;
	} else if (x <= 8.1e+191) {
		tmp = x;
	} else {
		tmp = x * (y / -t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -7.2e+92:
		tmp = x
	elif x <= -5.4e+74:
		tmp = y * (z / t)
	elif x <= -2.8e-68:
		tmp = x
	elif x <= 7.9e-25:
		tmp = (y / t) * z
	elif x <= 8.1e+191:
		tmp = x
	else:
		tmp = x * (y / -t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -7.2e+92)
		tmp = x;
	elseif (x <= -5.4e+74)
		tmp = Float64(y * Float64(z / t));
	elseif (x <= -2.8e-68)
		tmp = x;
	elseif (x <= 7.9e-25)
		tmp = Float64(Float64(y / t) * z);
	elseif (x <= 8.1e+191)
		tmp = x;
	else
		tmp = Float64(x * Float64(y / Float64(-t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -7.2e+92)
		tmp = x;
	elseif (x <= -5.4e+74)
		tmp = y * (z / t);
	elseif (x <= -2.8e-68)
		tmp = x;
	elseif (x <= 7.9e-25)
		tmp = (y / t) * z;
	elseif (x <= 8.1e+191)
		tmp = x;
	else
		tmp = x * (y / -t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.2e+92], x, If[LessEqual[x, -5.4e+74], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.8e-68], x, If[LessEqual[x, 7.9e-25], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 8.1e+191], x, N[(x * N[(y / (-t)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+92}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;x \leq -2.8 \cdot 10^{-68}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;x \leq 8.1 \cdot 10^{+191}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.2e92 or -5.3999999999999996e74 < x < -2.8000000000000001e-68 or 7.8999999999999997e-25 < x < 8.1000000000000002e191

    1. Initial program 96.7%

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

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

    if -7.2e92 < x < -5.3999999999999996e74

    1. Initial program 100.0%

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

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

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

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

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

    if -2.8000000000000001e-68 < x < 7.8999999999999997e-25

    1. Initial program 96.0%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. add-log-exp30.3%

        \[\leadsto \color{blue}{\log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      2. *-un-lft-identity30.3%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{y \cdot z}{t}}\right)} \]
      3. log-prod30.3%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      4. metadata-eval30.3%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{y \cdot z}{t}}\right) \]
      5. add-log-exp67.2%

        \[\leadsto 0 + \color{blue}{\frac{y \cdot z}{t}} \]
      6. associate-/l*65.7%

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

      \[\leadsto \color{blue}{0 + y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. +-lft-identity65.7%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
      2. *-commutative65.7%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
      4. associate-*r/69.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    8. Simplified69.5%

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

    if 8.1000000000000002e191 < x

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.9 \cdot 10^{-25}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{elif}\;x \leq 8.1 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{-t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 52.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+92}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;x \leq -1.16 \cdot 10^{-68}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;x \leq 1.18 \cdot 10^{+201}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.5500000000000001e92 or -7.5999999999999997e74 < x < -1.1599999999999999e-68 or 1.2500000000000001e-23 < x < 1.18e201

    1. Initial program 96.7%

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

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

    if -1.5500000000000001e92 < x < -7.5999999999999997e74

    1. Initial program 100.0%

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

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

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

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

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

    if -1.1599999999999999e-68 < x < 1.2500000000000001e-23

    1. Initial program 96.0%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. add-log-exp30.3%

        \[\leadsto \color{blue}{\log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      2. *-un-lft-identity30.3%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{y \cdot z}{t}}\right)} \]
      3. log-prod30.3%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      4. metadata-eval30.3%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{y \cdot z}{t}}\right) \]
      5. add-log-exp67.2%

        \[\leadsto 0 + \color{blue}{\frac{y \cdot z}{t}} \]
      6. associate-/l*65.7%

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

      \[\leadsto \color{blue}{0 + y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. +-lft-identity65.7%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
      2. *-commutative65.7%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
      4. associate-*r/69.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    8. Simplified69.5%

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

    if 1.18e201 < x

    1. Initial program 95.7%

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{t} \]
      2. distribute-lft-neg-out63.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -7.6 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;x \leq -1.16 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-23}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{elif}\;x \leq 1.18 \cdot 10^{+201}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+138} \lor \neg \left(z \leq -6 \cdot 10^{+32} \lor \neg \left(z \leq -2.35 \cdot 10^{-36}\right) \land z \leq 7.4 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.50000000000000005e138 or -6e32 < z < -2.3500000000000001e-36 or 7.39999999999999992e80 < z

    1. Initial program 94.5%

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

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

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

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

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

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

        \[\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-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)} \]
    6. Simplified80.3%

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

    if -1.50000000000000005e138 < z < -6e32 or -2.3500000000000001e-36 < z < 7.39999999999999992e80

    1. Initial program 97.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+138} \lor \neg \left(z \leq -6 \cdot 10^{+32} \lor \neg \left(z \leq -2.35 \cdot 10^{-36}\right) \land z \leq 7.4 \cdot 10^{+80}\right):\\ \;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{if}\;x \leq -8.8 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{+74}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+39} \lor \neg \left(x \leq 7.4 \cdot 10^{+61}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y t)))))
   (if (<= x -8.8e+95)
     t_1
     (if (<= x -2.1e+74)
       (* (/ y t) (- z x))
       (if (or (<= x -3.2e+39) (not (<= x 7.4e+61)))
         t_1
         (+ x (* y (/ z t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / t));
	double tmp;
	if (x <= -8.8e+95) {
		tmp = t_1;
	} else if (x <= -2.1e+74) {
		tmp = (y / t) * (z - x);
	} else if ((x <= -3.2e+39) || !(x <= 7.4e+61)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / t))
    if (x <= (-8.8d+95)) then
        tmp = t_1
    else if (x <= (-2.1d+74)) then
        tmp = (y / t) * (z - x)
    else if ((x <= (-3.2d+39)) .or. (.not. (x <= 7.4d+61))) then
        tmp = t_1
    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 t_1 = x * (1.0 - (y / t));
	double tmp;
	if (x <= -8.8e+95) {
		tmp = t_1;
	} else if (x <= -2.1e+74) {
		tmp = (y / t) * (z - x);
	} else if ((x <= -3.2e+39) || !(x <= 7.4e+61)) {
		tmp = t_1;
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / t))
	tmp = 0
	if x <= -8.8e+95:
		tmp = t_1
	elif x <= -2.1e+74:
		tmp = (y / t) * (z - x)
	elif (x <= -3.2e+39) or not (x <= 7.4e+61):
		tmp = t_1
	else:
		tmp = x + (y * (z / t))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / t)))
	tmp = 0.0
	if (x <= -8.8e+95)
		tmp = t_1;
	elseif (x <= -2.1e+74)
		tmp = Float64(Float64(y / t) * Float64(z - x));
	elseif ((x <= -3.2e+39) || !(x <= 7.4e+61))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y * Float64(z / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / t));
	tmp = 0.0;
	if (x <= -8.8e+95)
		tmp = t_1;
	elseif (x <= -2.1e+74)
		tmp = (y / t) * (z - x);
	elseif ((x <= -3.2e+39) || ~((x <= 7.4e+61)))
		tmp = t_1;
	else
		tmp = x + (y * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+95], t$95$1, If[LessEqual[x, -2.1e+74], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -3.2e+39], N[Not[LessEqual[x, 7.4e+61]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -3.2 \cdot 10^{+39} \lor \neg \left(x \leq 7.4 \cdot 10^{+61}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.7999999999999996e95 or -2.0999999999999999e74 < x < -3.19999999999999993e39 or 7.40000000000000005e61 < x

    1. Initial program 95.8%

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

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

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

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

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

    if -8.7999999999999996e95 < x < -2.0999999999999999e74

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999993e39 < x < 7.40000000000000005e61

    1. Initial program 96.6%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified85.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{+74}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+39} \lor \neg \left(x \leq 7.4 \cdot 10^{+61}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{t} \cdot z\\ t_2 := x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{if}\;z \leq -1.56 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+82}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ y t) z)) (t_2 (* x (- 1.0 (/ y t)))))
   (if (<= z -1.56e+156)
     t_1
     (if (<= z -1.15e+26)
       t_2
       (if (<= z -3.6e-36) (* y (/ z t)) (if (<= z 3.2e+82) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / t) * z;
	double t_2 = x * (1.0 - (y / t));
	double tmp;
	if (z <= -1.56e+156) {
		tmp = t_1;
	} else if (z <= -1.15e+26) {
		tmp = t_2;
	} else if (z <= -3.6e-36) {
		tmp = y * (z / t);
	} else if (z <= 3.2e+82) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (y / t) * z
    t_2 = x * (1.0d0 - (y / t))
    if (z <= (-1.56d+156)) then
        tmp = t_1
    else if (z <= (-1.15d+26)) then
        tmp = t_2
    else if (z <= (-3.6d-36)) then
        tmp = y * (z / t)
    else if (z <= 3.2d+82) then
        tmp = t_2
    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 / t) * z;
	double t_2 = x * (1.0 - (y / t));
	double tmp;
	if (z <= -1.56e+156) {
		tmp = t_1;
	} else if (z <= -1.15e+26) {
		tmp = t_2;
	} else if (z <= -3.6e-36) {
		tmp = y * (z / t);
	} else if (z <= 3.2e+82) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / t) * z
	t_2 = x * (1.0 - (y / t))
	tmp = 0
	if z <= -1.56e+156:
		tmp = t_1
	elif z <= -1.15e+26:
		tmp = t_2
	elif z <= -3.6e-36:
		tmp = y * (z / t)
	elif z <= 3.2e+82:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / t) * z)
	t_2 = Float64(x * Float64(1.0 - Float64(y / t)))
	tmp = 0.0
	if (z <= -1.56e+156)
		tmp = t_1;
	elseif (z <= -1.15e+26)
		tmp = t_2;
	elseif (z <= -3.6e-36)
		tmp = Float64(y * Float64(z / t));
	elseif (z <= 3.2e+82)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / t) * z;
	t_2 = x * (1.0 - (y / t));
	tmp = 0.0;
	if (z <= -1.56e+156)
		tmp = t_1;
	elseif (z <= -1.15e+26)
		tmp = t_2;
	elseif (z <= -3.6e-36)
		tmp = y * (z / t);
	elseif (z <= 3.2e+82)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.56e+156], t$95$1, If[LessEqual[z, -1.15e+26], t$95$2, If[LessEqual[z, -3.6e-36], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+82], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.55999999999999992e156 or 3.19999999999999975e82 < z

    1. Initial program 94.2%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. add-log-exp43.2%

        \[\leadsto \color{blue}{\log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      2. *-un-lft-identity43.2%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{y \cdot z}{t}}\right)} \]
      3. log-prod43.2%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      4. metadata-eval43.2%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{y \cdot z}{t}}\right) \]
      5. add-log-exp74.5%

        \[\leadsto 0 + \color{blue}{\frac{y \cdot z}{t}} \]
      6. associate-/l*71.0%

        \[\leadsto 0 + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Applied egg-rr71.0%

      \[\leadsto \color{blue}{0 + y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. +-lft-identity71.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
      2. *-commutative71.0%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
      3. associate-*l/74.5%

        \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
      4. associate-*r/78.2%

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

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

    if -1.55999999999999992e156 < z < -1.15e26 or -3.60000000000000032e-36 < z < 3.19999999999999975e82

    1. Initial program 97.2%

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

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

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

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

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

    if -1.15e26 < z < -3.60000000000000032e-36

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified71.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.56 \cdot 10^{+156}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+91}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -7.6 \cdot 10^{+74} \lor \neg \left(x \leq -2.75 \cdot 10^{-71}\right) \land x \leq 3 \cdot 10^{-25}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.19999999999999995e91 or -7.5999999999999997e74 < x < -2.7499999999999999e-71 or 2.9999999999999998e-25 < x

    1. Initial program 96.5%

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

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

    if -6.19999999999999995e91 < x < -7.5999999999999997e74 or -2.7499999999999999e-71 < x < 2.9999999999999998e-25

    1. Initial program 96.2%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified66.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -7.6 \cdot 10^{+74} \lor \neg \left(x \leq -2.75 \cdot 10^{-71}\right) \land x \leq 3 \cdot 10^{-25}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 51.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -2.55 \cdot 10^{+33}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-41}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e138 or 4.5e-41 < z

    1. Initial program 94.8%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. add-log-exp38.6%

        \[\leadsto \color{blue}{\log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      2. *-un-lft-identity38.6%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{y \cdot z}{t}}\right)} \]
      3. log-prod38.6%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{y \cdot z}{t}}\right)} \]
      4. metadata-eval38.6%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{y \cdot z}{t}}\right) \]
      5. add-log-exp66.7%

        \[\leadsto 0 + \color{blue}{\frac{y \cdot z}{t}} \]
      6. associate-/l*63.2%

        \[\leadsto 0 + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Applied egg-rr63.2%

      \[\leadsto \color{blue}{0 + y \cdot \frac{z}{t}} \]
    7. Step-by-step derivation
      1. +-lft-identity63.2%

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
      3. associate-*l/66.7%

        \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
      4. associate-*r/69.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    8. Simplified69.5%

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

    if -1.3e138 < z < -2.5499999999999999e33 or -1.75e-66 < z < 4.5e-41

    1. Initial program 97.2%

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

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

    if -2.5499999999999999e33 < z < -1.75e-66

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified60.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+138}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 84.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+16}:\\
\;\;\;\;\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 < -2.80000000000000024e-78

    1. Initial program 93.8%

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

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

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

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

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

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

    if -2.80000000000000024e-78 < t < 1.65e16

    1. Initial program 99.9%

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

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

    if 1.65e16 < t

    1. Initial program 90.0%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified91.5%

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

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

Alternative 10: 38.1% 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 96.4%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification36.7%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 91.2% 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 2024066 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

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

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