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

Percentage Accurate: 92.6% → 97.9%
Time: 8.5s
Alternatives: 9
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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    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}

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 9 alternatives:

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

Initial Program: 92.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - x\right)}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
	return x + ((y * (z - x)) / t);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    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.9% 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 92.6%

    \[x + \frac{y \cdot \left(z - x\right)}{t} \]
  2. 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. add-flipN/A

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
    6. mult-flipN/A

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
    11. remove-double-negN/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
    13. mult-flip-revN/A

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

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

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

Alternative 2: 85.6% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{t} \cdot \left(z - x\right)\\
t_2 := x + \frac{y \cdot \left(z - x\right)}{t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

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

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


\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 9.99999999999999945e272 < (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t))

    1. Initial program 92.6%

      \[x + \frac{y \cdot \left(z - x\right)}{t} \]
    2. 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. add-flipN/A

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
      6. mult-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
      11. remove-double-negN/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
      13. mult-flip-revN/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\frac{1}{t}}, z - x, x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
      5. lower-*.f6497.9

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
    5. Applied rewrites97.9%

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

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

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

        \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
      3. lower--.f6458.4

        \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
    8. Applied rewrites58.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{t} \cdot \color{blue}{\left(z - x\right)} \]
      9. lower-*.f6461.3

        \[\leadsto \frac{y}{t} \cdot \color{blue}{\left(z - x\right)} \]
    10. Applied rewrites61.3%

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

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

    1. Initial program 92.6%

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

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

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

    Alternative 3: 85.6% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{y}{t}, z, x\right)\\ \mathbf{if}\;z \leq -1.26 \cdot 10^{-76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-88}:\\ \;\;\;\;x - \frac{y}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (fma (/ y t) z x)))
       (if (<= z -1.26e-76) t_1 (if (<= z 4.7e-88) (- x (* (/ y t) x)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = fma((y / t), z, x);
    	double tmp;
    	if (z <= -1.26e-76) {
    		tmp = t_1;
    	} else if (z <= 4.7e-88) {
    		tmp = x - ((y / t) * x);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = fma(Float64(y / t), z, x)
    	tmp = 0.0
    	if (z <= -1.26e-76)
    		tmp = t_1;
    	elseif (z <= 4.7e-88)
    		tmp = Float64(x - Float64(Float64(y / t) * x));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -1.26e-76], t$95$1, If[LessEqual[z, 4.7e-88], N[(x - N[(N[(y / t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{y}{t}, z, x\right)\\
    \mathbf{if}\;z \leq -1.26 \cdot 10^{-76}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 4.7 \cdot 10^{-88}:\\
    \;\;\;\;x - \frac{y}{t} \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.26e-76 or 4.7e-88 < z

      1. Initial program 92.6%

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

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

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

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

            \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
          3. add-flipN/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
          11. remove-double-negN/A

            \[\leadsto \frac{y}{t} \cdot z + \color{blue}{x} \]
          12. lower-fma.f6477.0

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z, x\right)} \]
        3. Applied rewrites77.0%

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

        if -1.26e-76 < z < 4.7e-88

        1. Initial program 92.6%

          \[x + \frac{y \cdot \left(z - x\right)}{t} \]
        2. 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. add-flipN/A

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

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

            \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
          6. mult-flipN/A

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

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

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

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

            \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
          11. remove-double-negN/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
          13. mult-flip-revN/A

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
        4. Step-by-step derivation
          1. lift-fma.f64N/A

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

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

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

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

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

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

            \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{y \cdot \left(z - x\right)}{t}\right)\right)} \]
          8. distribute-neg-fracN/A

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

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

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

            \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(z - x\right) \cdot y}\right)}{t} \]
          12. distribute-lft-neg-inN/A

            \[\leadsto x - \frac{\color{blue}{\left(\mathsf{neg}\left(\left(z - x\right)\right)\right) \cdot y}}{t} \]
          13. lower-*.f64N/A

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

            \[\leadsto x - \frac{\left(\mathsf{neg}\left(\color{blue}{\left(z - x\right)}\right)\right) \cdot y}{t} \]
          15. sub-negate-revN/A

            \[\leadsto x - \frac{\color{blue}{\left(x - z\right)} \cdot y}{t} \]
          16. lower--.f6492.6

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{y}{t}\right)\right)\right)\right) \cdot x} \]
          8. remove-double-negN/A

            \[\leadsto x - \frac{y}{t} \cdot x \]
          9. lower-*.f6465.0

            \[\leadsto x - \frac{y}{t} \cdot \color{blue}{x} \]
        10. Applied rewrites65.0%

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

      Alternative 4: 85.1% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{y}{t}, z, x\right)\\ \mathbf{if}\;z \leq -1.26 \cdot 10^{-76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (fma (/ y t) z x)))
         (if (<= z -1.26e-76) t_1 (if (<= z 4.7e-88) (* x (- 1.0 (/ y t))) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = fma((y / t), z, x);
      	double tmp;
      	if (z <= -1.26e-76) {
      		tmp = t_1;
      	} else if (z <= 4.7e-88) {
      		tmp = x * (1.0 - (y / t));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = fma(Float64(y / t), z, x)
      	tmp = 0.0
      	if (z <= -1.26e-76)
      		tmp = t_1;
      	elseif (z <= 4.7e-88)
      		tmp = Float64(x * Float64(1.0 - Float64(y / t)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -1.26e-76], t$95$1, If[LessEqual[z, 4.7e-88], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(\frac{y}{t}, z, x\right)\\
      \mathbf{if}\;z \leq -1.26 \cdot 10^{-76}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 4.7 \cdot 10^{-88}:\\
      \;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.26e-76 or 4.7e-88 < z

        1. Initial program 92.6%

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

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

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

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

              \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
            3. add-flipN/A

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
            11. remove-double-negN/A

              \[\leadsto \frac{y}{t} \cdot z + \color{blue}{x} \]
            12. lower-fma.f6477.0

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z, x\right)} \]
          3. Applied rewrites77.0%

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

          if -1.26e-76 < z < 4.7e-88

          1. Initial program 92.6%

            \[x + \frac{y \cdot \left(z - x\right)}{t} \]
          2. 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. add-flipN/A

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

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

              \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
            6. mult-flipN/A

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

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

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

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

              \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
            11. remove-double-negN/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
            13. mult-flip-revN/A

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
          4. Step-by-step derivation
            1. lift-fma.f64N/A

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

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

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

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

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

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

              \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{y \cdot \left(z - x\right)}{t}\right)\right)} \]
            8. distribute-neg-fracN/A

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

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

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

              \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(z - x\right) \cdot y}\right)}{t} \]
            12. distribute-lft-neg-inN/A

              \[\leadsto x - \frac{\color{blue}{\left(\mathsf{neg}\left(\left(z - x\right)\right)\right) \cdot y}}{t} \]
            13. lower-*.f64N/A

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

              \[\leadsto x - \frac{\left(\mathsf{neg}\left(\color{blue}{\left(z - x\right)}\right)\right) \cdot y}{t} \]
            15. sub-negate-revN/A

              \[\leadsto x - \frac{\color{blue}{\left(x - z\right)} \cdot y}{t} \]
            16. lower--.f6492.6

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

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

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

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

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

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

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

        Alternative 5: 84.7% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-60}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-153}:\\ \;\;\;\;\frac{y \cdot \left(z - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, z, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= t -1.5e-60)
           (fma (/ z t) y x)
           (if (<= t 7e-153) (/ (* y (- z x)) t) (fma (/ y t) z x))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (t <= -1.5e-60) {
        		tmp = fma((z / t), y, x);
        	} else if (t <= 7e-153) {
        		tmp = (y * (z - x)) / t;
        	} else {
        		tmp = fma((y / t), z, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (t <= -1.5e-60)
        		tmp = fma(Float64(z / t), y, x);
        	elseif (t <= 7e-153)
        		tmp = Float64(Float64(y * Float64(z - x)) / t);
        	else
        		tmp = fma(Float64(y / t), z, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[t, -1.5e-60], N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 7e-153], N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * z + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;t \leq -1.5 \cdot 10^{-60}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
        
        \mathbf{elif}\;t \leq 7 \cdot 10^{-153}:\\
        \;\;\;\;\frac{y \cdot \left(z - x\right)}{t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, z, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -1.50000000000000009e-60

          1. Initial program 92.6%

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

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

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

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

                \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
              3. add-flipN/A

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
              9. remove-double-negN/A

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y, x\right) \]
            3. Applied rewrites73.5%

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

            if -1.50000000000000009e-60 < t < 6.99999999999999961e-153

            1. Initial program 92.6%

              \[x + \frac{y \cdot \left(z - x\right)}{t} \]
            2. 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. add-flipN/A

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

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

                \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
              6. mult-flipN/A

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

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

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

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

                \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
              11. remove-double-negN/A

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
              13. mult-flip-revN/A

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
            4. Step-by-step derivation
              1. lift-/.f64N/A

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

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

                \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\frac{1}{t}}, z - x, x\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
              5. lower-*.f6497.9

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
            5. Applied rewrites97.9%

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

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

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

                \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
              3. lower--.f6458.4

                \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
            8. Applied rewrites58.4%

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

            if 6.99999999999999961e-153 < t

            1. Initial program 92.6%

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

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

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

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

                  \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
                3. add-flipN/A

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                11. remove-double-negN/A

                  \[\leadsto \frac{y}{t} \cdot z + \color{blue}{x} \]
                12. lower-fma.f6477.0

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z, x\right)} \]
              3. Applied rewrites77.0%

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

            Alternative 6: 84.5% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{t} \cdot \left(z - x\right)\\ t_2 := x + \frac{y \cdot \left(z - x\right)}{t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+273}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* (/ y t) (- z x))) (t_2 (+ x (/ (* y (- z x)) t))))
               (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 1e+273) (fma (/ y t) z x) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (y / t) * (z - x);
            	double t_2 = x + ((y * (z - x)) / t);
            	double tmp;
            	if (t_2 <= -((double) INFINITY)) {
            		tmp = t_1;
            	} else if (t_2 <= 1e+273) {
            		tmp = fma((y / t), z, x);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(y / t) * Float64(z - x))
            	t_2 = Float64(x + Float64(Float64(y * Float64(z - x)) / t))
            	tmp = 0.0
            	if (t_2 <= Float64(-Inf))
            		tmp = t_1;
            	elseif (t_2 <= 1e+273)
            		tmp = fma(Float64(y / t), z, x);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+273], N[(N[(y / t), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{y}{t} \cdot \left(z - x\right)\\
            t_2 := x + \frac{y \cdot \left(z - x\right)}{t}\\
            \mathbf{if}\;t\_2 \leq -\infty:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_2 \leq 10^{+273}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, z, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \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 9.99999999999999945e272 < (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t))

              1. Initial program 92.6%

                \[x + \frac{y \cdot \left(z - x\right)}{t} \]
              2. 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. add-flipN/A

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

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

                  \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                6. mult-flipN/A

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

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

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

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

                  \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                11. remove-double-negN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
                13. mult-flip-revN/A

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
              4. Step-by-step derivation
                1. lift-/.f64N/A

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

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

                  \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\frac{1}{t}}, z - x, x\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
                5. lower-*.f6497.9

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{t} \cdot y}, z - x, x\right) \]
              5. Applied rewrites97.9%

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

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

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

                  \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
                3. lower--.f6458.4

                  \[\leadsto \frac{y \cdot \left(z - x\right)}{t} \]
              8. Applied rewrites58.4%

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{y}{t} \cdot \color{blue}{\left(z - x\right)} \]
                9. lower-*.f6461.3

                  \[\leadsto \frac{y}{t} \cdot \color{blue}{\left(z - x\right)} \]
              10. Applied rewrites61.3%

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

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

              1. Initial program 92.6%

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
                  3. add-flipN/A

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                  11. remove-double-negN/A

                    \[\leadsto \frac{y}{t} \cdot z + \color{blue}{x} \]
                  12. lower-fma.f6477.0

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z, x\right)} \]
                3. Applied rewrites77.0%

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

              Alternative 7: 77.0% accurate, 1.4× speedup?

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
                  3. add-flipN/A

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                  11. remove-double-negN/A

                    \[\leadsto \frac{y}{t} \cdot z + \color{blue}{x} \]
                  12. lower-fma.f6477.0

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z, x\right)} \]
                3. Applied rewrites77.0%

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

                Alternative 8: 55.3% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{t} \cdot z\\ \mathbf{if}\;y \leq -9.5 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 860000000:\\ \;\;\;\;x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (* (/ y t) z)))
                   (if (<= y -9.5e-65) t_1 (if (<= y 860000000.0) (* x 1.0) t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = (y / t) * z;
                	double tmp;
                	if (y <= -9.5e-65) {
                		tmp = t_1;
                	} else if (y <= 860000000.0) {
                		tmp = x * 1.0;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t)
                use fmin_fmax_functions
                    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 (y <= (-9.5d-65)) then
                        tmp = t_1
                    else if (y <= 860000000.0d0) then
                        tmp = x * 1.0d0
                    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 (y <= -9.5e-65) {
                		tmp = t_1;
                	} else if (y <= 860000000.0) {
                		tmp = x * 1.0;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = (y / t) * z
                	tmp = 0
                	if y <= -9.5e-65:
                		tmp = t_1
                	elif y <= 860000000.0:
                		tmp = x * 1.0
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t)
                	t_1 = Float64(Float64(y / t) * z)
                	tmp = 0.0
                	if (y <= -9.5e-65)
                		tmp = t_1;
                	elseif (y <= 860000000.0)
                		tmp = Float64(x * 1.0);
                	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 (y <= -9.5e-65)
                		tmp = t_1;
                	elseif (y <= 860000000.0)
                		tmp = x * 1.0;
                	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[y, -9.5e-65], t$95$1, If[LessEqual[y, 860000000.0], N[(x * 1.0), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{y}{t} \cdot z\\
                \mathbf{if}\;y \leq -9.5 \cdot 10^{-65}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 860000000:\\
                \;\;\;\;x \cdot 1\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -9.5000000000000004e-65 or 8.6e8 < y

                  1. Initial program 92.6%

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

                    \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
                  3. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{y \cdot z}{\color{blue}{t}} \]
                    2. lower-*.f6437.9

                      \[\leadsto \frac{y \cdot z}{t} \]
                  4. Applied rewrites37.9%

                    \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

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

                      \[\leadsto \frac{y \cdot z}{t} \]
                    3. associate-*l/N/A

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

                      \[\leadsto \frac{y}{t} \cdot z \]
                    5. lower-*.f6441.1

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

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

                  if -9.5000000000000004e-65 < y < 8.6e8

                  1. Initial program 92.6%

                    \[x + \frac{y \cdot \left(z - x\right)}{t} \]
                  2. 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. add-flipN/A

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

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

                      \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                    6. mult-flipN/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                    11. remove-double-negN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
                    13. mult-flip-revN/A

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
                  4. Step-by-step derivation
                    1. lift-fma.f64N/A

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{y \cdot \left(z - x\right)}{t}\right)\right)} \]
                    8. distribute-neg-fracN/A

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

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

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

                      \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(z - x\right) \cdot y}\right)}{t} \]
                    12. distribute-lft-neg-inN/A

                      \[\leadsto x - \frac{\color{blue}{\left(\mathsf{neg}\left(\left(z - x\right)\right)\right) \cdot y}}{t} \]
                    13. lower-*.f64N/A

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

                      \[\leadsto x - \frac{\left(\mathsf{neg}\left(\color{blue}{\left(z - x\right)}\right)\right) \cdot y}{t} \]
                    15. sub-negate-revN/A

                      \[\leadsto x - \frac{\color{blue}{\left(x - z\right)} \cdot y}{t} \]
                    16. lower--.f6492.6

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

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

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

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

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

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

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

                    \[\leadsto x \cdot 1 \]
                  10. Step-by-step derivation
                    1. Applied rewrites38.4%

                      \[\leadsto x \cdot 1 \]
                  11. Recombined 2 regimes into one program.
                  12. Add Preprocessing

                  Alternative 9: 38.4% accurate, 3.2× speedup?

                  \[\begin{array}{l} \\ x \cdot 1 \end{array} \]
                  (FPCore (x y z t) :precision binary64 (* x 1.0))
                  double code(double x, double y, double z, double t) {
                  	return x * 1.0;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      code = x * 1.0d0
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	return x * 1.0;
                  }
                  
                  def code(x, y, z, t):
                  	return x * 1.0
                  
                  function code(x, y, z, t)
                  	return Float64(x * 1.0)
                  end
                  
                  function tmp = code(x, y, z, t)
                  	tmp = x * 1.0;
                  end
                  
                  code[x_, y_, z_, t_] := N[(x * 1.0), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  x \cdot 1
                  \end{array}
                  
                  Derivation
                  1. Initial program 92.6%

                    \[x + \frac{y \cdot \left(z - x\right)}{t} \]
                  2. 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. add-flipN/A

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

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

                      \[\leadsto \color{blue}{\frac{y \cdot \left(z - x\right)}{t}} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                    6. mult-flipN/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(y \cdot \frac{1}{t}\right) \cdot \left(z - x\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) \]
                    11. remove-double-negN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \frac{1}{t}, z - x, x\right)} \]
                    13. mult-flip-revN/A

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
                  4. Step-by-step derivation
                    1. lift-fma.f64N/A

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{y \cdot \left(z - x\right)}{t}\right)\right)} \]
                    8. distribute-neg-fracN/A

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

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

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

                      \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(z - x\right) \cdot y}\right)}{t} \]
                    12. distribute-lft-neg-inN/A

                      \[\leadsto x - \frac{\color{blue}{\left(\mathsf{neg}\left(\left(z - x\right)\right)\right) \cdot y}}{t} \]
                    13. lower-*.f64N/A

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

                      \[\leadsto x - \frac{\left(\mathsf{neg}\left(\color{blue}{\left(z - x\right)}\right)\right) \cdot y}{t} \]
                    15. sub-negate-revN/A

                      \[\leadsto x - \frac{\color{blue}{\left(x - z\right)} \cdot y}{t} \]
                    16. lower--.f6492.6

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

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

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

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

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

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

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

                    \[\leadsto x \cdot 1 \]
                  10. Step-by-step derivation
                    1. Applied rewrites38.4%

                      \[\leadsto x \cdot 1 \]
                    2. Add Preprocessing

                    Reproduce

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