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

Percentage Accurate: 92.4% → 97.6%
Time: 6.3s
Alternatives: 8
Speedup: 1.1×

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 8 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.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{y}{t}, z - x, x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma (/ y t) (- z x) x))
double code(double x, double y, double z, double t) {
	return fma((y / t), (z - x), x);
}
function code(x, y, z, t)
	return fma(Float64(y / t), Float64(z - x), x)
end
code[x_, y_, z_, t_] := N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)
\end{array}
Derivation
  1. Initial program 90.6%

    \[x + \frac{y \cdot \left(z - x\right)}{t} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t} + x} \]
    3. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + x \]
    4. lift-*.f64N/A

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

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

      \[\leadsto \color{blue}{\left(z - x\right) \cdot \frac{y}{t}} + x \]
    7. *-commutativeN/A

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(z - x\right)} + x \]
    8. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
    9. lower-/.f6498.2

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{t}}, z - x, x\right) \]
  4. Applied rewrites98.2%

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

Alternative 2: 85.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot \left(z - x\right)}{t}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+265}\right):\\ \;\;\;\;\frac{z - x}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y (- z x)) t))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+265)))
     (* (/ (- z x) t) y)
     (+ x (/ (* z y) t)))))
double code(double x, double y, double z, double t) {
	double t_1 = x + ((y * (z - x)) / t);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+265)) {
		tmp = ((z - x) / t) * y;
	} else {
		tmp = x + ((z * y) / t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x + ((y * (z - x)) / t);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+265)) {
		tmp = ((z - x) / t) * y;
	} else {
		tmp = x + ((z * y) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + ((y * (z - x)) / t)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 1e+265):
		tmp = ((z - x) / t) * y
	else:
		tmp = x + ((z * y) / t)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(Float64(y * Float64(z - x)) / t))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+265))
		tmp = Float64(Float64(Float64(z - x) / t) * y);
	else
		tmp = Float64(x + Float64(Float64(z * y) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + ((y * (z - x)) / t);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 1e+265)))
		tmp = ((z - x) / t) * y;
	else
		tmp = x + ((z * y) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+265]], $MachinePrecision]], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 77.1%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{t} - \frac{x}{t}\right)} \]
    4. Step-by-step derivation
      1. div-subN/A

        \[\leadsto y \cdot \color{blue}{\frac{z - x}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{z - x}{t}} \cdot y \]
      5. lower--.f6491.5

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t)) < 1.00000000000000007e265

    1. Initial program 98.1%

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

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

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{t} \]
      2. lower-*.f6484.7

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{t} \]
    5. Applied rewrites84.7%

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

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

Alternative 3: 52.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+135}:\\
\;\;\;\;1 \cdot x\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.50000000000000036e135 or 1.1e134 < t

    1. Initial program 78.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
      4. metadata-evalN/A

        \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
      5. *-lft-identityN/A

        \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
      7. lower-/.f6481.6

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

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

      \[\leadsto 1 \cdot x \]
    7. Step-by-step derivation
      1. Applied rewrites74.8%

        \[\leadsto 1 \cdot x \]

      if -9.50000000000000036e135 < t < 6.60000000000000062e-213

      1. Initial program 95.5%

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

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

          \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
        3. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
        4. lower-/.f6452.2

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
      6. Step-by-step derivation
        1. Applied rewrites60.8%

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

        if 6.60000000000000062e-213 < t < 1.65000000000000008e-106

        1. Initial program 94.4%

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

          \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
          3. fp-cancel-sign-sub-invN/A

            \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
          4. metadata-evalN/A

            \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
          5. *-lft-identityN/A

            \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
          6. lower--.f64N/A

            \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
          7. lower-/.f6486.3

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

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

          \[\leadsto \left(-1 \cdot \frac{y}{t}\right) \cdot x \]
        7. Step-by-step derivation
          1. Applied rewrites78.7%

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

          if 1.65000000000000008e-106 < t < 1.1e134

          1. Initial program 97.3%

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

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

              \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
            3. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
            4. lower-/.f6460.7

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

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

        Alternative 4: 74.8% accurate, 0.7× speedup?

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

          1. Initial program 77.1%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
            3. fp-cancel-sign-sub-invN/A

              \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
            4. metadata-evalN/A

              \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
            5. *-lft-identityN/A

              \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
            6. lower--.f64N/A

              \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
            7. lower-/.f6476.3

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

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

          if -1.75000000000000005e72 < t < 1.1e134

          1. Initial program 97.6%

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

            \[\leadsto \color{blue}{y \cdot \left(\frac{z}{t} - \frac{x}{t}\right)} \]
          4. Step-by-step derivation
            1. div-subN/A

              \[\leadsto y \cdot \color{blue}{\frac{z - x}{t}} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
            3. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
            4. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{z - x}{t}} \cdot y \]
            5. lower--.f6478.1

              \[\leadsto \frac{\color{blue}{z - x}}{t} \cdot y \]
          5. Applied rewrites78.1%

            \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
          6. Step-by-step derivation
            1. Applied rewrites83.7%

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

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

          Alternative 5: 73.0% accurate, 0.7× speedup?

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

            1. Initial program 89.2%

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

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

                \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
              3. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
              4. lower-/.f6464.2

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

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

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

              if -7.2000000000000002e42 < z < 1.18e14

              1. Initial program 91.9%

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

                \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                3. fp-cancel-sign-sub-invN/A

                  \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
                4. metadata-evalN/A

                  \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
                5. *-lft-identityN/A

                  \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
                6. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
                7. lower-/.f6481.8

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

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

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

            Alternative 6: 72.5% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+42}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-98}:\\ \;\;\;\;\left(1 - \frac{y}{t}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{z - x}{t} \cdot y\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -7.2e+42)
               (* z (/ y t))
               (if (<= z 1.2e-98) (* (- 1.0 (/ y t)) x) (* (/ (- z x) t) y))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -7.2e+42) {
            		tmp = z * (y / t);
            	} else if (z <= 1.2e-98) {
            		tmp = (1.0 - (y / t)) * x;
            	} else {
            		tmp = ((z - x) / t) * y;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: tmp
                if (z <= (-7.2d+42)) then
                    tmp = z * (y / t)
                else if (z <= 1.2d-98) then
                    tmp = (1.0d0 - (y / t)) * x
                else
                    tmp = ((z - x) / t) * y
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -7.2e+42) {
            		tmp = z * (y / t);
            	} else if (z <= 1.2e-98) {
            		tmp = (1.0 - (y / t)) * x;
            	} else {
            		tmp = ((z - x) / t) * y;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -7.2e+42:
            		tmp = z * (y / t)
            	elif z <= 1.2e-98:
            		tmp = (1.0 - (y / t)) * x
            	else:
            		tmp = ((z - x) / t) * y
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -7.2e+42)
            		tmp = Float64(z * Float64(y / t));
            	elseif (z <= 1.2e-98)
            		tmp = Float64(Float64(1.0 - Float64(y / t)) * x);
            	else
            		tmp = Float64(Float64(Float64(z - x) / t) * y);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -7.2e+42)
            		tmp = z * (y / t);
            	elseif (z <= 1.2e-98)
            		tmp = (1.0 - (y / t)) * x;
            	else
            		tmp = ((z - x) / t) * y;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -7.2e+42], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-98], N[(N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -7.2 \cdot 10^{+42}:\\
            \;\;\;\;z \cdot \frac{y}{t}\\
            
            \mathbf{elif}\;z \leq 1.2 \cdot 10^{-98}:\\
            \;\;\;\;\left(1 - \frac{y}{t}\right) \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{z - x}{t} \cdot y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -7.2000000000000002e42

              1. Initial program 88.1%

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

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

                  \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                3. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                4. lower-/.f6469.6

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

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
              6. Step-by-step derivation
                1. Applied rewrites77.0%

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

                if -7.2000000000000002e42 < z < 1.20000000000000002e-98

                1. Initial program 93.3%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                  3. fp-cancel-sign-sub-invN/A

                    \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
                  4. metadata-evalN/A

                    \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
                  5. *-lft-identityN/A

                    \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
                  6. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
                  7. lower-/.f6487.1

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

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

                if 1.20000000000000002e-98 < z

                1. Initial program 89.2%

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

                  \[\leadsto \color{blue}{y \cdot \left(\frac{z}{t} - \frac{x}{t}\right)} \]
                4. Step-by-step derivation
                  1. div-subN/A

                    \[\leadsto y \cdot \color{blue}{\frac{z - x}{t}} \]
                  2. *-commutativeN/A

                    \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
                  3. lower-*.f64N/A

                    \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
                  4. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{z - x}{t}} \cdot y \]
                  5. lower--.f6469.1

                    \[\leadsto \frac{\color{blue}{z - x}}{t} \cdot y \]
                5. Applied rewrites69.1%

                  \[\leadsto \color{blue}{\frac{z - x}{t} \cdot y} \]
              7. Recombined 3 regimes into one program.
              8. Add Preprocessing

              Alternative 7: 53.5% accurate, 0.8× speedup?

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

                1. Initial program 78.2%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                  3. fp-cancel-sign-sub-invN/A

                    \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
                  4. metadata-evalN/A

                    \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
                  5. *-lft-identityN/A

                    \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
                  6. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
                  7. lower-/.f6481.6

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

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

                  \[\leadsto 1 \cdot x \]
                7. Step-by-step derivation
                  1. Applied rewrites74.8%

                    \[\leadsto 1 \cdot x \]

                  if -9.50000000000000036e135 < t < 9.99999999999999921e133

                  1. Initial program 95.7%

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

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

                      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                    3. lower-*.f64N/A

                      \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                    4. lower-/.f6451.8

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

                    \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                  6. Step-by-step derivation
                    1. Applied rewrites58.0%

                      \[\leadsto z \cdot \color{blue}{\frac{y}{t}} \]
                  7. Recombined 2 regimes into one program.
                  8. Final simplification62.9%

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

                  Alternative 8: 38.2% accurate, 3.8× speedup?

                  \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                  (FPCore (x y z t) :precision binary64 (* 1.0 x))
                  double code(double x, double y, double z, double t) {
                  	return 1.0 * 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 = 1.0d0 * x
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	return 1.0 * x;
                  }
                  
                  def code(x, y, z, t):
                  	return 1.0 * x
                  
                  function code(x, y, z, t)
                  	return Float64(1.0 * x)
                  end
                  
                  function tmp = code(x, y, z, t)
                  	tmp = 1.0 * x;
                  end
                  
                  code[x_, y_, z_, t_] := N[(1.0 * x), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  1 \cdot x
                  \end{array}
                  
                  Derivation
                  1. Initial program 90.6%

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

                    \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{t}\right) \cdot x} \]
                    3. fp-cancel-sign-sub-invN/A

                      \[\leadsto \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y}{t}\right)} \cdot x \]
                    4. metadata-evalN/A

                      \[\leadsto \left(1 - \color{blue}{1} \cdot \frac{y}{t}\right) \cdot x \]
                    5. *-lft-identityN/A

                      \[\leadsto \left(1 - \color{blue}{\frac{y}{t}}\right) \cdot x \]
                    6. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right)} \cdot x \]
                    7. lower-/.f6460.3

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

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

                    \[\leadsto 1 \cdot x \]
                  7. Step-by-step derivation
                    1. Applied rewrites34.2%

                      \[\leadsto 1 \cdot x \]
                    2. 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 2024339 
                    (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)))