Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 68.8% → 87.4%
Time: 12.3s
Alternatives: 17
Speedup: 0.8×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 68.8% accurate, 1.0× speedup?

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}

Alternative 1: 87.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-291}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
      14. difference-of-squaresN/A

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

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

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
      17. lower-+.f6457.0

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
    4. Applied rewrites57.0%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
      4. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
      6. lower--.f6452.0

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      10. div-subN/A

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

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

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      13. distribute-rgt-out--N/A

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

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

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

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      17. lower--.f6471.7

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999962e-292 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.9999999999999999e298

    1. Initial program 97.1%

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

    if -9.99999999999999962e-292 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
      14. difference-of-squaresN/A

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

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

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
      17. lower-+.f643.7

        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
    4. Applied rewrites3.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
      4. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
      6. lower--.f641.6

        \[\leadsto \mathsf{fma}\left(y - x, \frac{\color{blue}{z - t}}{a}, x\right) \]
    7. Applied rewrites1.6%

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      10. div-subN/A

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

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

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      13. distribute-rgt-out--N/A

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

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

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

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      17. lower--.f6482.9

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

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

      \[\leadsto y - -1 \cdot \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    12. Step-by-step derivation
      1. Applied rewrites99.7%

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

    Alternative 2: 71.9% accurate, 0.7× speedup?

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

      1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
        14. difference-of-squaresN/A

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

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

          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
        17. lower-+.f6465.2

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
        4. lower--.f64N/A

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

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

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

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

      if -9.0000000000000006e-80 < a < 5.0000000000000002e-203

      1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
        14. difference-of-squaresN/A

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

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

          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
        17. lower-+.f6453.7

          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
      4. Applied rewrites53.7%

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
        4. lower--.f64N/A

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

          \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
        6. lower--.f6419.3

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

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

        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
      9. Step-by-step derivation
        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
        10. div-subN/A

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

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

          \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
        13. distribute-rgt-out--N/A

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

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

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

          \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
        17. lower--.f6488.8

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

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

        \[\leadsto y - \frac{z \cdot \left(y - x\right)}{\color{blue}{t}} \]
      12. Step-by-step derivation
        1. Applied rewrites83.3%

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

        if 5.0000000000000002e-203 < a < 1.94999999999999989e-16

        1. Initial program 52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
          14. difference-of-squaresN/A

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

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

            \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
          17. lower-+.f6443.2

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
          4. lower--.f64N/A

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

            \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
          6. lower--.f6424.3

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

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

          \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
        9. Step-by-step derivation
          1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
          10. div-subN/A

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

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

            \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
          13. distribute-rgt-out--N/A

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

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

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

            \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
          17. lower--.f6477.7

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

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

          \[\leadsto y - -1 \cdot \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
        12. Step-by-step derivation
          1. Applied rewrites74.7%

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

        Alternative 3: 60.5% accurate, 0.7× speedup?

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

          1. Initial program 70.6%

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

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

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

              \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
            3. *-commutativeN/A

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
            6. lower--.f6467.3

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
          6. Step-by-step derivation
            1. Applied rewrites68.9%

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

            if -1.1e-76 < a < 1.29999999999999998e-304

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z}{a - t}} \]
              8. lower--.f6469.3

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

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

            if 1.29999999999999998e-304 < a < 8.4999999999999998e-40

            1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
              14. difference-of-squaresN/A

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

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

                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
              17. lower-+.f6451.7

                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
            4. Applied rewrites51.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
            5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(z - t\right)}{t}} \]
            9. Step-by-step derivation
              1. Applied rewrites58.4%

                \[\leadsto \frac{z - t}{t} \cdot \color{blue}{\left(-y\right)} \]
            10. Recombined 3 regimes into one program.
            11. Final simplification66.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-76}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-304}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-40}:\\ \;\;\;\;\frac{z - t}{t} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \end{array} \]
            12. Add Preprocessing

            Alternative 4: 58.6% accurate, 0.7× speedup?

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

              1. Initial program 69.4%

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

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

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

                  \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                3. *-commutativeN/A

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                6. lower--.f6465.1

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites66.5%

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

                if -1.34999999999999993e-97 < a < 1.1e-304

                1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                  14. difference-of-squaresN/A

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

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

                    \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                  17. lower-+.f6449.6

                    \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                4. Applied rewrites49.6%

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                  4. lower--.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                  6. lower--.f6418.6

                    \[\leadsto \mathsf{fma}\left(y - x, \frac{\color{blue}{z - t}}{a}, x\right) \]
                7. Applied rewrites18.6%

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

                  \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                9. Step-by-step derivation
                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                  10. div-subN/A

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

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

                    \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                  13. distribute-rgt-out--N/A

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

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

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

                    \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                  17. lower--.f6489.4

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

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

                  \[\leadsto z \cdot \color{blue}{\left(\frac{x}{t} - \frac{y}{t}\right)} \]
                12. Step-by-step derivation
                  1. Applied rewrites70.2%

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

                  if 1.1e-304 < a < 8.4999999999999998e-40

                  1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                    14. difference-of-squaresN/A

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

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

                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                    17. lower-+.f6451.7

                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                  4. Applied rewrites51.7%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                  5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(z - t\right)}{t}} \]
                  9. Step-by-step derivation
                    1. Applied rewrites58.4%

                      \[\leadsto \frac{z - t}{t} \cdot \color{blue}{\left(-y\right)} \]
                  10. Recombined 3 regimes into one program.
                  11. Final simplification65.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-97}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-304}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-40}:\\ \;\;\;\;\frac{z - t}{t} \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 5: 74.2% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{-79} \lor \neg \left(a \leq 2.6 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (or (<= a -5.3e-79) (not (<= a 2.6e+34)))
                     (fma (- y x) (/ (- z t) a) x)
                     (- y (* (/ (- y x) t) (- z a)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if ((a <= -5.3e-79) || !(a <= 2.6e+34)) {
                  		tmp = fma((y - x), ((z - t) / a), x);
                  	} else {
                  		tmp = y - (((y - x) / t) * (z - a));
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if ((a <= -5.3e-79) || !(a <= 2.6e+34))
                  		tmp = fma(Float64(y - x), Float64(Float64(z - t) / a), x);
                  	else
                  		tmp = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a)));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.3e-79], N[Not[LessEqual[a, 2.6e+34]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -5.3 \cdot 10^{-79} \lor \neg \left(a \leq 2.6 \cdot 10^{+34}\right):\\
                  \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if a < -5.2999999999999998e-79 or 2.59999999999999997e34 < a

                    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                      14. difference-of-squaresN/A

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                      17. lower-+.f6464.4

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

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                      4. lower--.f64N/A

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

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

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

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

                    if -5.2999999999999998e-79 < a < 2.59999999999999997e34

                    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                      14. difference-of-squaresN/A

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                      17. lower-+.f6452.2

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

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                      4. lower--.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                      6. lower--.f6423.3

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

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

                      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                    9. Step-by-step derivation
                      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                      10. div-subN/A

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

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

                        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                      13. distribute-rgt-out--N/A

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

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

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

                        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                      17. lower--.f6484.8

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{-79} \lor \neg \left(a \leq 2.6 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 6: 71.8% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-80} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (or (<= a -9e-80) (not (<= a 3.3e-29)))
                     (fma (- y x) (/ (- z t) a) x)
                     (- y (/ (* z (- y x)) t))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if ((a <= -9e-80) || !(a <= 3.3e-29)) {
                  		tmp = fma((y - x), ((z - t) / a), x);
                  	} else {
                  		tmp = y - ((z * (y - x)) / t);
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if ((a <= -9e-80) || !(a <= 3.3e-29))
                  		tmp = fma(Float64(y - x), Float64(Float64(z - t) / a), x);
                  	else
                  		tmp = Float64(y - Float64(Float64(z * Float64(y - x)) / t));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9e-80], N[Not[LessEqual[a, 3.3e-29]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -9 \cdot 10^{-80} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\
                  \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if a < -9.0000000000000006e-80 or 3.30000000000000028e-29 < a

                    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                      14. difference-of-squaresN/A

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                      17. lower-+.f6465.5

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                    4. Applied rewrites65.5%

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                      4. lower--.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                      6. lower--.f6476.7

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

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

                    if -9.0000000000000006e-80 < a < 3.30000000000000028e-29

                    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                      14. difference-of-squaresN/A

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

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

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                      17. lower-+.f6450.0

                        \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                    4. Applied rewrites50.0%

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                      4. lower--.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                    9. Step-by-step derivation
                      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                      10. div-subN/A

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

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

                        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                      13. distribute-rgt-out--N/A

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

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

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

                        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                      17. lower--.f6485.2

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

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

                      \[\leadsto y - \frac{z \cdot \left(y - x\right)}{\color{blue}{t}} \]
                    12. Step-by-step derivation
                      1. Applied rewrites76.9%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-80} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \]
                    15. Add Preprocessing

                    Alternative 7: 71.3% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-78} \lor \neg \left(a \leq 5.1 \cdot 10^{-39}\right):\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (or (<= a -1e-78) (not (<= a 5.1e-39)))
                       (fma (- z t) (/ (- y x) a) x)
                       (- y (/ (* z (- y x)) t))))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if ((a <= -1e-78) || !(a <= 5.1e-39)) {
                    		tmp = fma((z - t), ((y - x) / a), x);
                    	} else {
                    		tmp = y - ((z * (y - x)) / t);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if ((a <= -1e-78) || !(a <= 5.1e-39))
                    		tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x);
                    	else
                    		tmp = Float64(y - Float64(Float64(z * Float64(y - x)) / t));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e-78], N[Not[LessEqual[a, 5.1e-39]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;a \leq -1 \cdot 10^{-78} \lor \neg \left(a \leq 5.1 \cdot 10^{-39}\right):\\
                    \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if a < -9.99999999999999999e-79 or 5.09999999999999988e-39 < a

                      1. Initial program 70.8%

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \frac{y - x}{a}, x\right) \]
                        6. lower-/.f64N/A

                          \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y - x}{a}}, x\right) \]
                        7. lower--.f6475.1

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

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

                      if -9.99999999999999999e-79 < a < 5.09999999999999988e-39

                      1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                        14. difference-of-squaresN/A

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

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

                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                        17. lower-+.f6449.6

                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                      4. Applied rewrites49.6%

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

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                        4. lower--.f64N/A

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

                          \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                        6. lower--.f6421.7

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

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

                        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                      9. Step-by-step derivation
                        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                        10. div-subN/A

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

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

                          \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                        13. distribute-rgt-out--N/A

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

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

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

                          \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                        17. lower--.f6484.5

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

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

                        \[\leadsto y - \frac{z \cdot \left(y - x\right)}{\color{blue}{t}} \]
                      12. Step-by-step derivation
                        1. Applied rewrites76.2%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-78} \lor \neg \left(a \leq 5.1 \cdot 10^{-39}\right):\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \]
                      15. Add Preprocessing

                      Alternative 8: 67.9% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-79} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (or (<= a -2.9e-79) (not (<= a 3.3e-29)))
                         (fma (/ z a) (- y x) x)
                         (- y (/ (* z (- y x)) t))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if ((a <= -2.9e-79) || !(a <= 3.3e-29)) {
                      		tmp = fma((z / a), (y - x), x);
                      	} else {
                      		tmp = y - ((z * (y - x)) / t);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if ((a <= -2.9e-79) || !(a <= 3.3e-29))
                      		tmp = fma(Float64(z / a), Float64(y - x), x);
                      	else
                      		tmp = Float64(y - Float64(Float64(z * Float64(y - x)) / t));
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e-79], N[Not[LessEqual[a, 3.3e-29]], $MachinePrecision]], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;a \leq -2.9 \cdot 10^{-79} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\
                      \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if a < -2.9000000000000001e-79 or 3.30000000000000028e-29 < a

                        1. Initial program 71.0%

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

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

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

                            \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                          3. *-commutativeN/A

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

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

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                          6. lower--.f6467.1

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                        6. Step-by-step derivation
                          1. Applied rewrites69.3%

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

                          if -2.9000000000000001e-79 < a < 3.30000000000000028e-29

                          1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                            14. difference-of-squaresN/A

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

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

                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                            17. lower-+.f6450.0

                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                          4. Applied rewrites50.0%

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

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

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

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                            4. lower--.f64N/A

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

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

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

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

                            \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                          9. Step-by-step derivation
                            1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                            10. div-subN/A

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

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

                              \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                            13. distribute-rgt-out--N/A

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

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

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

                              \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                            17. lower--.f6485.2

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

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

                            \[\leadsto y - \frac{z \cdot \left(y - x\right)}{\color{blue}{t}} \]
                          12. Step-by-step derivation
                            1. Applied rewrites76.9%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-79} \lor \neg \left(a \leq 3.3 \cdot 10^{-29}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\ \end{array} \]
                          15. Add Preprocessing

                          Alternative 9: 62.8% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+178} \lor \neg \left(t \leq 1.95 \cdot 10^{+112}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= t -8e+178) (not (<= t 1.95e+112)))
                             (fma a (/ (- y x) t) y)
                             (fma (/ z a) (- y x) x)))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((t <= -8e+178) || !(t <= 1.95e+112)) {
                          		tmp = fma(a, ((y - x) / t), y);
                          	} else {
                          		tmp = fma((z / a), (y - x), x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((t <= -8e+178) || !(t <= 1.95e+112))
                          		tmp = fma(a, Float64(Float64(y - x) / t), y);
                          	else
                          		tmp = fma(Float64(z / a), Float64(y - x), x);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e+178], N[Not[LessEqual[t, 1.95e+112]], $MachinePrecision]], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;t \leq -8 \cdot 10^{+178} \lor \neg \left(t \leq 1.95 \cdot 10^{+112}\right):\\
                          \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -8.0000000000000004e178 or 1.94999999999999984e112 < t

                            1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                              14. difference-of-squaresN/A

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

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

                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                              17. lower-+.f6415.7

                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                            4. Applied rewrites15.7%

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                              4. lower--.f64N/A

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

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

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

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

                              \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                            9. Step-by-step derivation
                              1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                              10. div-subN/A

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

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

                                \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                              13. distribute-rgt-out--N/A

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

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

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

                                \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                              17. lower--.f6487.2

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

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

                              \[\leadsto y - \color{blue}{-1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                            12. Step-by-step derivation
                              1. Applied rewrites64.8%

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

                              if -8.0000000000000004e178 < t < 1.94999999999999984e112

                              1. Initial program 80.2%

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

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

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

                                  \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                3. *-commutativeN/A

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

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

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                6. lower--.f6461.4

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                              6. Step-by-step derivation
                                1. Applied rewrites61.6%

                                  \[\leadsto \mathsf{fma}\left(\frac{z}{a}, \color{blue}{y - x}, x\right) \]
                              7. Recombined 2 regimes into one program.
                              8. Final simplification62.4%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+178} \lor \neg \left(t \leq 1.95 \cdot 10^{+112}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \end{array} \]
                              9. Add Preprocessing

                              Alternative 10: 55.4% accurate, 0.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-97} \lor \neg \left(a \leq 2.9 \cdot 10^{-18}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (or (<= a -1.35e-97) (not (<= a 2.9e-18)))
                                 (fma (/ z a) (- y x) x)
                                 (* (/ (- x y) t) z)))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if ((a <= -1.35e-97) || !(a <= 2.9e-18)) {
                              		tmp = fma((z / a), (y - x), x);
                              	} else {
                              		tmp = ((x - y) / t) * z;
                              	}
                              	return tmp;
                              }
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if ((a <= -1.35e-97) || !(a <= 2.9e-18))
                              		tmp = fma(Float64(z / a), Float64(y - x), x);
                              	else
                              		tmp = Float64(Float64(Float64(x - y) / t) * z);
                              	end
                              	return tmp
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.35e-97], N[Not[LessEqual[a, 2.9e-18]], $MachinePrecision]], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;a \leq -1.35 \cdot 10^{-97} \lor \neg \left(a \leq 2.9 \cdot 10^{-18}\right):\\
                              \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{x - y}{t} \cdot z\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < -1.34999999999999993e-97 or 2.9e-18 < a

                                1. Initial program 69.8%

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

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

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

                                    \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                  3. *-commutativeN/A

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

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

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                  6. lower--.f6465.4

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites66.8%

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

                                  if -1.34999999999999993e-97 < a < 2.9e-18

                                  1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                    14. difference-of-squaresN/A

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

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

                                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                    17. lower-+.f6451.3

                                      \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                  4. Applied rewrites51.3%

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

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

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

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                                    4. lower--.f64N/A

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

                                      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                                    6. lower--.f6420.3

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

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

                                    \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                                  9. Step-by-step derivation
                                    1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                                    10. div-subN/A

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

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

                                      \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                                    13. distribute-rgt-out--N/A

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

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

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

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

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

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

                                    \[\leadsto z \cdot \color{blue}{\left(\frac{x}{t} - \frac{y}{t}\right)} \]
                                  12. Step-by-step derivation
                                    1. Applied rewrites54.0%

                                      \[\leadsto \frac{x - y}{t} \cdot \color{blue}{z} \]
                                  13. Recombined 2 regimes into one program.
                                  14. Final simplification61.8%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-97} \lor \neg \left(a \leq 2.9 \cdot 10^{-18}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \end{array} \]
                                  15. Add Preprocessing

                                  Alternative 11: 48.6% accurate, 0.9× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 2.55 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (if (or (<= a -1.46e-97) (not (<= a 2.55e+34)))
                                     (fma (/ y a) z x)
                                     (* (/ (- x y) t) z)))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double tmp;
                                  	if ((a <= -1.46e-97) || !(a <= 2.55e+34)) {
                                  		tmp = fma((y / a), z, x);
                                  	} else {
                                  		tmp = ((x - y) / t) * z;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a)
                                  	tmp = 0.0
                                  	if ((a <= -1.46e-97) || !(a <= 2.55e+34))
                                  		tmp = fma(Float64(y / a), z, x);
                                  	else
                                  		tmp = Float64(Float64(Float64(x - y) / t) * z);
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.46e-97], N[Not[LessEqual[a, 2.55e+34]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 2.55 \cdot 10^{+34}\right):\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x - y}{t} \cdot z\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if a < -1.4600000000000001e-97 or 2.55000000000000018e34 < a

                                    1. Initial program 69.2%

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

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

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

                                        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                      3. *-commutativeN/A

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

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

                                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                      6. lower--.f6465.3

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

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

                                      \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites58.5%

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

                                      if -1.4600000000000001e-97 < a < 2.55000000000000018e34

                                      1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                        14. difference-of-squaresN/A

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

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

                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                        17. lower-+.f6453.1

                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                      4. Applied rewrites53.1%

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

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)} \]
                                        4. lower--.f64N/A

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

                                          \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{z - t}{a}}, x\right) \]
                                        6. lower--.f6423.1

                                          \[\leadsto \mathsf{fma}\left(y - x, \frac{\color{blue}{z - t}}{a}, x\right) \]
                                      7. Applied rewrites23.1%

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

                                        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
                                      9. Step-by-step derivation
                                        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
                                        10. div-subN/A

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

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

                                          \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
                                        13. distribute-rgt-out--N/A

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

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

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

                                          \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
                                        17. lower--.f6486.5

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

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

                                        \[\leadsto z \cdot \color{blue}{\left(\frac{x}{t} - \frac{y}{t}\right)} \]
                                      12. Step-by-step derivation
                                        1. Applied rewrites54.3%

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 2.55 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \end{array} \]
                                      15. Add Preprocessing

                                      Alternative 12: 47.5% accurate, 0.9× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 1.52 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a)
                                       :precision binary64
                                       (if (or (<= a -1.46e-97) (not (<= a 1.52e+34)))
                                         (fma (/ y a) z x)
                                         (/ (* (- x y) z) t)))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if ((a <= -1.46e-97) || !(a <= 1.52e+34)) {
                                      		tmp = fma((y / a), z, x);
                                      	} else {
                                      		tmp = ((x - y) * z) / t;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a)
                                      	tmp = 0.0
                                      	if ((a <= -1.46e-97) || !(a <= 1.52e+34))
                                      		tmp = fma(Float64(y / a), z, x);
                                      	else
                                      		tmp = Float64(Float64(Float64(x - y) * z) / t);
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.46e-97], N[Not[LessEqual[a, 1.52e+34]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 1.52 \cdot 10^{+34}\right):\\
                                      \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if a < -1.4600000000000001e-97 or 1.52000000000000001e34 < a

                                        1. Initial program 69.2%

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

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

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

                                            \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                          3. *-commutativeN/A

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

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                          6. lower--.f6465.3

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

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

                                          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites58.5%

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

                                          if -1.4600000000000001e-97 < a < 1.52000000000000001e34

                                          1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                            14. difference-of-squaresN/A

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

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

                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                            17. lower-+.f6453.1

                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                          4. Applied rewrites53.1%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                          5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{-97} \lor \neg \left(a \leq 1.52 \cdot 10^{+34}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\ \end{array} \]
                                          12. Add Preprocessing

                                          Alternative 13: 51.3% accurate, 1.0× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+178} \lor \neg \left(t \leq 1.9 \cdot 10^{+132}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (if (or (<= t -7.5e+178) (not (<= t 1.9e+132))) y (fma (/ y a) z x)))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if ((t <= -7.5e+178) || !(t <= 1.9e+132)) {
                                          		tmp = y;
                                          	} else {
                                          		tmp = fma((y / a), z, x);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t, a)
                                          	tmp = 0.0
                                          	if ((t <= -7.5e+178) || !(t <= 1.9e+132))
                                          		tmp = y;
                                          	else
                                          		tmp = fma(Float64(y / a), z, x);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.5e+178], N[Not[LessEqual[t, 1.9e+132]], $MachinePrecision]], y, N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;t \leq -7.5 \cdot 10^{+178} \lor \neg \left(t \leq 1.9 \cdot 10^{+132}\right):\\
                                          \;\;\;\;y\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if t < -7.4999999999999995e178 or 1.90000000000000003e132 < t

                                            1. Initial program 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                              14. difference-of-squaresN/A

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

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

                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                              17. lower-+.f6411.7

                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                            4. Applied rewrites11.7%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                            5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites35.1%

                                                \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                              2. Step-by-step derivation
                                                1. Applied rewrites55.2%

                                                  \[\leadsto y + 0 \]

                                                if -7.4999999999999995e178 < t < 1.90000000000000003e132

                                                1. Initial program 79.2%

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

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

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

                                                    \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                                  3. *-commutativeN/A

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

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

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                                  6. lower--.f6460.9

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

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites53.4%

                                                    \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                                8. Recombined 2 regimes into one program.
                                                9. Final simplification53.8%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+178} \lor \neg \left(t \leq 1.9 \cdot 10^{+132}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 14: 39.6% accurate, 1.0× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+106} \lor \neg \left(z \leq 1.12 \cdot 10^{+83}\right):\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \left(-y\right)\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (if (or (<= z -1.6e+106) (not (<= z 1.12e+83))) (* y (/ z a)) (- x (- y))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if ((z <= -1.6e+106) || !(z <= 1.12e+83)) {
                                                		tmp = y * (z / a);
                                                	} else {
                                                		tmp = x - -y;
                                                	}
                                                	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, a)
                                                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), intent (in) :: a
                                                    real(8) :: tmp
                                                    if ((z <= (-1.6d+106)) .or. (.not. (z <= 1.12d+83))) then
                                                        tmp = y * (z / a)
                                                    else
                                                        tmp = x - -y
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if ((z <= -1.6e+106) || !(z <= 1.12e+83)) {
                                                		tmp = y * (z / a);
                                                	} else {
                                                		tmp = x - -y;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a):
                                                	tmp = 0
                                                	if (z <= -1.6e+106) or not (z <= 1.12e+83):
                                                		tmp = y * (z / a)
                                                	else:
                                                		tmp = x - -y
                                                	return tmp
                                                
                                                function code(x, y, z, t, a)
                                                	tmp = 0.0
                                                	if ((z <= -1.6e+106) || !(z <= 1.12e+83))
                                                		tmp = Float64(y * Float64(z / a));
                                                	else
                                                		tmp = Float64(x - Float64(-y));
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a)
                                                	tmp = 0.0;
                                                	if ((z <= -1.6e+106) || ~((z <= 1.12e+83)))
                                                		tmp = y * (z / a);
                                                	else
                                                		tmp = x - -y;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+106], N[Not[LessEqual[z, 1.12e+83]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(x - (-y)), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;z \leq -1.6 \cdot 10^{+106} \lor \neg \left(z \leq 1.12 \cdot 10^{+83}\right):\\
                                                \;\;\;\;y \cdot \frac{z}{a}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;x - \left(-y\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if z < -1.5999999999999999e106 or 1.12e83 < z

                                                  1. Initial program 72.9%

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

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

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

                                                      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                                    3. *-commutativeN/A

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

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                                    6. lower--.f6455.8

                                                      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - x}}{a}, z, x\right) \]
                                                  5. Applied rewrites55.8%

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

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

                                                      \[\leadsto \frac{z \cdot y}{\color{blue}{a}} \]
                                                    2. Step-by-step derivation
                                                      1. Applied rewrites36.0%

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

                                                      if -1.5999999999999999e106 < z < 1.12e83

                                                      1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                        14. difference-of-squaresN/A

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

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

                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                        17. lower-+.f6457.2

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

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                                      5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                                      9. Step-by-step derivation
                                                        1. Applied rewrites19.3%

                                                          \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                                        2. Taylor expanded in x around 0

                                                          \[\leadsto x - -1 \cdot y \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites42.3%

                                                            \[\leadsto x - \left(-y\right) \]
                                                        4. Recombined 2 regimes into one program.
                                                        5. Final simplification39.9%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+106} \lor \neg \left(z \leq 1.12 \cdot 10^{+83}\right):\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \left(-y\right)\\ \end{array} \]
                                                        6. Add Preprocessing

                                                        Alternative 15: 39.2% accurate, 1.0× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+83}:\\ \;\;\;\;x - \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a)
                                                         :precision binary64
                                                         (if (<= z -1.6e+106)
                                                           (* y (/ z a))
                                                           (if (<= z 1.12e+83) (- x (- y)) (* (/ y a) z))))
                                                        double code(double x, double y, double z, double t, double a) {
                                                        	double tmp;
                                                        	if (z <= -1.6e+106) {
                                                        		tmp = y * (z / a);
                                                        	} else if (z <= 1.12e+83) {
                                                        		tmp = x - -y;
                                                        	} else {
                                                        		tmp = (y / a) * z;
                                                        	}
                                                        	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, a)
                                                        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), intent (in) :: a
                                                            real(8) :: tmp
                                                            if (z <= (-1.6d+106)) then
                                                                tmp = y * (z / a)
                                                            else if (z <= 1.12d+83) then
                                                                tmp = x - -y
                                                            else
                                                                tmp = (y / a) * z
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double x, double y, double z, double t, double a) {
                                                        	double tmp;
                                                        	if (z <= -1.6e+106) {
                                                        		tmp = y * (z / a);
                                                        	} else if (z <= 1.12e+83) {
                                                        		tmp = x - -y;
                                                        	} else {
                                                        		tmp = (y / a) * z;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x, y, z, t, a):
                                                        	tmp = 0
                                                        	if z <= -1.6e+106:
                                                        		tmp = y * (z / a)
                                                        	elif z <= 1.12e+83:
                                                        		tmp = x - -y
                                                        	else:
                                                        		tmp = (y / a) * z
                                                        	return tmp
                                                        
                                                        function code(x, y, z, t, a)
                                                        	tmp = 0.0
                                                        	if (z <= -1.6e+106)
                                                        		tmp = Float64(y * Float64(z / a));
                                                        	elseif (z <= 1.12e+83)
                                                        		tmp = Float64(x - Float64(-y));
                                                        	else
                                                        		tmp = Float64(Float64(y / a) * z);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x, y, z, t, a)
                                                        	tmp = 0.0;
                                                        	if (z <= -1.6e+106)
                                                        		tmp = y * (z / a);
                                                        	elseif (z <= 1.12e+83)
                                                        		tmp = x - -y;
                                                        	else
                                                        		tmp = (y / a) * z;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+106], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+83], N[(x - (-y)), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;z \leq -1.6 \cdot 10^{+106}:\\
                                                        \;\;\;\;y \cdot \frac{z}{a}\\
                                                        
                                                        \mathbf{elif}\;z \leq 1.12 \cdot 10^{+83}:\\
                                                        \;\;\;\;x - \left(-y\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{y}{a} \cdot z\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if z < -1.5999999999999999e106

                                                          1. Initial program 69.0%

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

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

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

                                                              \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                                            3. *-commutativeN/A

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

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

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                                            6. lower--.f6451.7

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - x}}{a}, z, x\right) \]
                                                          5. Applied rewrites51.7%

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

                                                            \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites26.5%

                                                              \[\leadsto \frac{z \cdot y}{\color{blue}{a}} \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites30.6%

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

                                                              if -1.5999999999999999e106 < z < 1.12e83

                                                              1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                14. difference-of-squaresN/A

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

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

                                                                  \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                17. lower-+.f6457.2

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

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                                              5. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                                              9. Step-by-step derivation
                                                                1. Applied rewrites19.3%

                                                                  \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                                                2. Taylor expanded in x around 0

                                                                  \[\leadsto x - -1 \cdot y \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites42.3%

                                                                    \[\leadsto x - \left(-y\right) \]

                                                                  if 1.12e83 < z

                                                                  1. Initial program 76.3%

                                                                    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in t around 0

                                                                    \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
                                                                  4. Step-by-step derivation
                                                                    1. +-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a} + x} \]
                                                                    2. associate-/l*N/A

                                                                      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
                                                                    3. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{y - x}{a} \cdot z} + x \]
                                                                    4. lower-fma.f64N/A

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                                                                    5. lower-/.f64N/A

                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - x}{a}}, z, x\right) \]
                                                                    6. lower--.f6459.4

                                                                      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - x}}{a}, z, x\right) \]
                                                                  5. Applied rewrites59.4%

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                                                                  6. Taylor expanded in x around 0

                                                                    \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites34.3%

                                                                      \[\leadsto \frac{z \cdot y}{\color{blue}{a}} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites42.7%

                                                                        \[\leadsto \frac{y}{a} \cdot z \]
                                                                    3. Recombined 3 regimes into one program.
                                                                    4. Final simplification40.3%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+106}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+83}:\\ \;\;\;\;x - \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \end{array} \]
                                                                    5. Add Preprocessing

                                                                    Alternative 16: 37.2% accurate, 1.6× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+242} \lor \neg \left(t \leq 2.8 \cdot 10^{+125}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x - \left(-y\right)\\ \end{array} \end{array} \]
                                                                    (FPCore (x y z t a)
                                                                     :precision binary64
                                                                     (if (or (<= t -2.2e+242) (not (<= t 2.8e+125))) y (- x (- y))))
                                                                    double code(double x, double y, double z, double t, double a) {
                                                                    	double tmp;
                                                                    	if ((t <= -2.2e+242) || !(t <= 2.8e+125)) {
                                                                    		tmp = y;
                                                                    	} else {
                                                                    		tmp = x - -y;
                                                                    	}
                                                                    	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, a)
                                                                    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), intent (in) :: a
                                                                        real(8) :: tmp
                                                                        if ((t <= (-2.2d+242)) .or. (.not. (t <= 2.8d+125))) then
                                                                            tmp = y
                                                                        else
                                                                            tmp = x - -y
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double x, double y, double z, double t, double a) {
                                                                    	double tmp;
                                                                    	if ((t <= -2.2e+242) || !(t <= 2.8e+125)) {
                                                                    		tmp = y;
                                                                    	} else {
                                                                    		tmp = x - -y;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(x, y, z, t, a):
                                                                    	tmp = 0
                                                                    	if (t <= -2.2e+242) or not (t <= 2.8e+125):
                                                                    		tmp = y
                                                                    	else:
                                                                    		tmp = x - -y
                                                                    	return tmp
                                                                    
                                                                    function code(x, y, z, t, a)
                                                                    	tmp = 0.0
                                                                    	if ((t <= -2.2e+242) || !(t <= 2.8e+125))
                                                                    		tmp = y;
                                                                    	else
                                                                    		tmp = Float64(x - Float64(-y));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(x, y, z, t, a)
                                                                    	tmp = 0.0;
                                                                    	if ((t <= -2.2e+242) || ~((t <= 2.8e+125)))
                                                                    		tmp = y;
                                                                    	else
                                                                    		tmp = x - -y;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.2e+242], N[Not[LessEqual[t, 2.8e+125]], $MachinePrecision]], y, N[(x - (-y)), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;t \leq -2.2 \cdot 10^{+242} \lor \neg \left(t \leq 2.8 \cdot 10^{+125}\right):\\
                                                                    \;\;\;\;y\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;x - \left(-y\right)\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if t < -2.19999999999999999e242 or 2.8000000000000001e125 < t

                                                                      1. Initial program 29.5%

                                                                        \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                                      2. Add Preprocessing
                                                                      3. Step-by-step derivation
                                                                        1. lift-+.f64N/A

                                                                          \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} \]
                                                                        2. +-commutativeN/A

                                                                          \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
                                                                        3. lift-/.f64N/A

                                                                          \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} + x \]
                                                                        4. lift--.f64N/A

                                                                          \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
                                                                        5. flip--N/A

                                                                          \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
                                                                        6. associate-/r/N/A

                                                                          \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
                                                                        7. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
                                                                        8. lower-fma.f64N/A

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
                                                                        9. lower-+.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
                                                                        10. lift-*.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
                                                                        11. associate-/l*N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                        12. lower-*.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                        13. lower-/.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                        14. difference-of-squaresN/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                        15. lift--.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
                                                                        16. lower-*.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                        17. lower-+.f6414.2

                                                                          \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                                                      4. Applied rewrites14.2%

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                                                      5. Taylor expanded in a around 0

                                                                        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t}} \]
                                                                      6. Step-by-step derivation
                                                                        1. +-commutativeN/A

                                                                          \[\leadsto \color{blue}{-1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t} + x} \]
                                                                        2. mul-1-negN/A

                                                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\left(y - x\right) \cdot \left(z - t\right)}{t}\right)\right)} + x \]
                                                                        3. associate-/l*N/A

                                                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - t}{t}}\right)\right) + x \]
                                                                        4. distribute-lft-neg-inN/A

                                                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - t}{t}} + x \]
                                                                        5. mul-1-negN/A

                                                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - t}{t} + x \]
                                                                        6. lower-fma.f64N/A

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                        7. mul-1-negN/A

                                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(y - x\right)\right)}, \frac{z - t}{t}, x\right) \]
                                                                        8. lower-neg.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{-\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                        9. lower--.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(-\color{blue}{\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                        10. lower-/.f64N/A

                                                                          \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \color{blue}{\frac{z - t}{t}}, x\right) \]
                                                                        11. lower--.f6442.1

                                                                          \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \frac{\color{blue}{z - t}}{t}, x\right) \]
                                                                      7. Applied rewrites42.1%

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                      8. Taylor expanded in z around 0

                                                                        \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                                                      9. Step-by-step derivation
                                                                        1. Applied rewrites34.6%

                                                                          \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites56.6%

                                                                            \[\leadsto y + 0 \]

                                                                          if -2.19999999999999999e242 < t < 2.8000000000000001e125

                                                                          1. Initial program 77.9%

                                                                            \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                                          2. Add Preprocessing
                                                                          3. Step-by-step derivation
                                                                            1. lift-+.f64N/A

                                                                              \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} \]
                                                                            2. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
                                                                            3. lift-/.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} + x \]
                                                                            4. lift--.f64N/A

                                                                              \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
                                                                            5. flip--N/A

                                                                              \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
                                                                            6. associate-/r/N/A

                                                                              \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
                                                                            7. *-commutativeN/A

                                                                              \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
                                                                            8. lower-fma.f64N/A

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
                                                                            9. lower-+.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
                                                                            10. lift-*.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
                                                                            11. associate-/l*N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                            12. lower-*.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                            13. lower-/.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                            14. difference-of-squaresN/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                            15. lift--.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
                                                                            16. lower-*.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                            17. lower-+.f6470.6

                                                                              \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                                                          4. Applied rewrites70.6%

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                                                          5. Taylor expanded in a around 0

                                                                            \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t}} \]
                                                                          6. Step-by-step derivation
                                                                            1. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{-1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t} + x} \]
                                                                            2. mul-1-negN/A

                                                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\left(y - x\right) \cdot \left(z - t\right)}{t}\right)\right)} + x \]
                                                                            3. associate-/l*N/A

                                                                              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - t}{t}}\right)\right) + x \]
                                                                            4. distribute-lft-neg-inN/A

                                                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - t}{t}} + x \]
                                                                            5. mul-1-negN/A

                                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - t}{t} + x \]
                                                                            6. lower-fma.f64N/A

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                            7. mul-1-negN/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(y - x\right)\right)}, \frac{z - t}{t}, x\right) \]
                                                                            8. lower-neg.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{-\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                            9. lower--.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(-\color{blue}{\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                            10. lower-/.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \color{blue}{\frac{z - t}{t}}, x\right) \]
                                                                            11. lower--.f6435.2

                                                                              \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \frac{\color{blue}{z - t}}{t}, x\right) \]
                                                                          7. Applied rewrites35.2%

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                          8. Taylor expanded in z around 0

                                                                            \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                                                          9. Step-by-step derivation
                                                                            1. Applied rewrites10.3%

                                                                              \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                                                            2. Taylor expanded in x around 0

                                                                              \[\leadsto x - -1 \cdot y \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites30.7%

                                                                                \[\leadsto x - \left(-y\right) \]
                                                                            4. Recombined 2 regimes into one program.
                                                                            5. Final simplification36.1%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+242} \lor \neg \left(t \leq 2.8 \cdot 10^{+125}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x - \left(-y\right)\\ \end{array} \]
                                                                            6. Add Preprocessing

                                                                            Alternative 17: 25.7% accurate, 29.0× speedup?

                                                                            \[\begin{array}{l} \\ y \end{array} \]
                                                                            (FPCore (x y z t a) :precision binary64 y)
                                                                            double code(double x, double y, double z, double t, double a) {
                                                                            	return y;
                                                                            }
                                                                            
                                                                            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, a)
                                                                            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), intent (in) :: a
                                                                                code = y
                                                                            end function
                                                                            
                                                                            public static double code(double x, double y, double z, double t, double a) {
                                                                            	return y;
                                                                            }
                                                                            
                                                                            def code(x, y, z, t, a):
                                                                            	return y
                                                                            
                                                                            function code(x, y, z, t, a)
                                                                            	return y
                                                                            end
                                                                            
                                                                            function tmp = code(x, y, z, t, a)
                                                                            	tmp = y;
                                                                            end
                                                                            
                                                                            code[x_, y_, z_, t_, a_] := y
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            y
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Initial program 67.8%

                                                                              \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-+.f64N/A

                                                                                \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} \]
                                                                              2. +-commutativeN/A

                                                                                \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
                                                                              3. lift-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} + x \]
                                                                              4. lift--.f64N/A

                                                                                \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
                                                                              5. flip--N/A

                                                                                \[\leadsto \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
                                                                              6. associate-/r/N/A

                                                                                \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
                                                                              7. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
                                                                              8. lower-fma.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
                                                                              9. lower-+.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{\left(y - x\right) \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
                                                                              10. lift-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
                                                                              11. associate-/l*N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                              12. lower-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                              13. lower-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a \cdot a - t \cdot t}}, x\right) \]
                                                                              14. difference-of-squaresN/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                              15. lift--.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
                                                                              16. lower-*.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
                                                                              17. lower-+.f6458.9

                                                                                \[\leadsto \mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\color{blue}{\left(a + t\right)} \cdot \left(a - t\right)}, x\right) \]
                                                                            4. Applied rewrites58.9%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \left(y - x\right) \cdot \frac{z - t}{\left(a + t\right) \cdot \left(a - t\right)}, x\right)} \]
                                                                            5. Taylor expanded in a around 0

                                                                              \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t}} \]
                                                                            6. Step-by-step derivation
                                                                              1. +-commutativeN/A

                                                                                \[\leadsto \color{blue}{-1 \cdot \frac{\left(y - x\right) \cdot \left(z - t\right)}{t} + x} \]
                                                                              2. mul-1-negN/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\left(y - x\right) \cdot \left(z - t\right)}{t}\right)\right)} + x \]
                                                                              3. associate-/l*N/A

                                                                                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - t}{t}}\right)\right) + x \]
                                                                              4. distribute-lft-neg-inN/A

                                                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - t}{t}} + x \]
                                                                              5. mul-1-negN/A

                                                                                \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - t}{t} + x \]
                                                                              6. lower-fma.f64N/A

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                              7. mul-1-negN/A

                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(y - x\right)\right)}, \frac{z - t}{t}, x\right) \]
                                                                              8. lower-neg.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{-\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                              9. lower--.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(-\color{blue}{\left(y - x\right)}, \frac{z - t}{t}, x\right) \]
                                                                              10. lower-/.f64N/A

                                                                                \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \color{blue}{\frac{z - t}{t}}, x\right) \]
                                                                              11. lower--.f6436.7

                                                                                \[\leadsto \mathsf{fma}\left(-\left(y - x\right), \frac{\color{blue}{z - t}}{t}, x\right) \]
                                                                            7. Applied rewrites36.7%

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(y - x\right), \frac{z - t}{t}, x\right)} \]
                                                                            8. Taylor expanded in z around 0

                                                                              \[\leadsto x + \color{blue}{-1 \cdot \left(x - y\right)} \]
                                                                            9. Step-by-step derivation
                                                                              1. Applied rewrites15.3%

                                                                                \[\leadsto x - \color{blue}{\left(x - y\right)} \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites21.2%

                                                                                  \[\leadsto y + 0 \]
                                                                                2. Final simplification21.2%

                                                                                  \[\leadsto y \]
                                                                                3. Add Preprocessing

                                                                                Developer Target 1: 86.8% accurate, 0.6× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                (FPCore (x y z t a)
                                                                                 :precision binary64
                                                                                 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
                                                                                   (if (< a -1.6153062845442575e-142)
                                                                                     t_1
                                                                                     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
                                                                                double code(double x, double y, double z, double t, double a) {
                                                                                	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                	double tmp;
                                                                                	if (a < -1.6153062845442575e-142) {
                                                                                		tmp = t_1;
                                                                                	} else if (a < 3.774403170083174e-182) {
                                                                                		tmp = y - ((z / t) * (y - x));
                                                                                	} 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, a)
                                                                                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), intent (in) :: a
                                                                                    real(8) :: t_1
                                                                                    real(8) :: tmp
                                                                                    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
                                                                                    if (a < (-1.6153062845442575d-142)) then
                                                                                        tmp = t_1
                                                                                    else if (a < 3.774403170083174d-182) then
                                                                                        tmp = y - ((z / t) * (y - x))
                                                                                    else
                                                                                        tmp = t_1
                                                                                    end if
                                                                                    code = tmp
                                                                                end function
                                                                                
                                                                                public static double code(double x, double y, double z, double t, double a) {
                                                                                	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                	double tmp;
                                                                                	if (a < -1.6153062845442575e-142) {
                                                                                		tmp = t_1;
                                                                                	} else if (a < 3.774403170083174e-182) {
                                                                                		tmp = y - ((z / t) * (y - x));
                                                                                	} else {
                                                                                		tmp = t_1;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                def code(x, y, z, t, a):
                                                                                	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
                                                                                	tmp = 0
                                                                                	if a < -1.6153062845442575e-142:
                                                                                		tmp = t_1
                                                                                	elif a < 3.774403170083174e-182:
                                                                                		tmp = y - ((z / t) * (y - x))
                                                                                	else:
                                                                                		tmp = t_1
                                                                                	return tmp
                                                                                
                                                                                function code(x, y, z, t, a)
                                                                                	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
                                                                                	tmp = 0.0
                                                                                	if (a < -1.6153062845442575e-142)
                                                                                		tmp = t_1;
                                                                                	elseif (a < 3.774403170083174e-182)
                                                                                		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
                                                                                	else
                                                                                		tmp = t_1;
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                function tmp_2 = code(x, y, z, t, a)
                                                                                	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                	tmp = 0.0;
                                                                                	if (a < -1.6153062845442575e-142)
                                                                                		tmp = t_1;
                                                                                	elseif (a < 3.774403170083174e-182)
                                                                                		tmp = y - ((z / t) * (y - x));
                                                                                	else
                                                                                		tmp = t_1;
                                                                                	end
                                                                                	tmp_2 = tmp;
                                                                                end
                                                                                
                                                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
                                                                                \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
                                                                                \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                

                                                                                Reproduce

                                                                                ?
                                                                                herbie shell --seed 2024359 
                                                                                (FPCore (x y z t a)
                                                                                  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                                                  :precision binary64
                                                                                
                                                                                  :alt
                                                                                  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                                                                
                                                                                  (+ x (/ (* (- y x) (- z t)) (- a t))))