Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.9% → 92.9%
Time: 5.5s
Alternatives: 21
Speedup: 0.3×

Specification

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

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 21 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: 79.9% accurate, 1.0× speedup?

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

Alternative 1: 92.9% accurate, 0.3× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(y - z\right), x\right) \]
      15. frac-2neg-revN/A

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

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

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

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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z} \]
      10. lower--.f6445.9

        \[\leadsto \left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z} \]
    4. Applied rewrites45.9%

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

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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
      14. metadata-eval83.6

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

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

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

Alternative 2: 92.9% accurate, 0.3× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(y - z\right), x\right) \]
      15. frac-2neg-revN/A

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

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

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

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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.5

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
    4. Applied rewrites46.5%

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

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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
      14. metadata-eval83.6

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

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

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

Alternative 3: 86.2% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{-1}{a - z} \cdot \left(y - z\right), x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{z - a} \cdot \left(x - t\right)\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-302)
     (fma (- x t) (* (/ -1.0 (- a z)) (- y z)) x)
     (if (<= t_1 5e-177)
       (* t (- (/ y (- a z)) (/ z (- a z))))
       (- x (* (/ (- z y) (- z a)) (- x t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-302) {
		tmp = fma((x - t), ((-1.0 / (a - z)) * (y - z)), x);
	} else if (t_1 <= 5e-177) {
		tmp = t * ((y / (a - z)) - (z / (a - z)));
	} else {
		tmp = x - (((z - y) / (z - a)) * (x - t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -1e-302)
		tmp = fma(Float64(x - t), Float64(Float64(-1.0 / Float64(a - z)) * Float64(y - z)), x);
	elseif (t_1 <= 5e-177)
		tmp = Float64(t * Float64(Float64(y / Float64(a - z)) - Float64(z / Float64(a - z))));
	else
		tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(z - a)) * Float64(x - t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-302], N[(N[(x - t), $MachinePrecision] * N[(N[(-1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 5e-177], N[(t * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{-1}{a - z} \cdot \left(y - z\right), x\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\
\;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(y - z\right), x\right) \]
      15. frac-2neg-revN/A

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

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

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e-177

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

    if 5e-177 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
      14. metadata-eval83.6

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

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

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

Alternative 4: 86.2% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{z - a} \cdot \left(x - t\right)\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-302)
     (fma (- x t) (/ (- z y) (- a z)) x)
     (if (<= t_1 5e-177)
       (* t (- (/ y (- a z)) (/ z (- a z))))
       (- x (* (/ (- z y) (- z a)) (- x t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-302) {
		tmp = fma((x - t), ((z - y) / (a - z)), x);
	} else if (t_1 <= 5e-177) {
		tmp = t * ((y / (a - z)) - (z / (a - z)));
	} else {
		tmp = x - (((z - y) / (z - a)) * (x - t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -1e-302)
		tmp = fma(Float64(x - t), Float64(Float64(z - y) / Float64(a - z)), x);
	elseif (t_1 <= 5e-177)
		tmp = Float64(t * Float64(Float64(y / Float64(a - z)) - Float64(z / Float64(a - z))));
	else
		tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(z - a)) * Float64(x - t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-302], N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 5e-177], N[(t * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\
\;\;\;\;t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e-177

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

    if 5e-177 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
      14. metadata-eval83.6

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

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

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

Alternative 5: 85.5% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{z - a} \cdot \left(x - t\right)\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-302)
     (fma (- x t) (/ (- z y) (- a z)) x)
     (if (<= t_1 5e-177)
       (/ (* t (- y z)) (- a z))
       (- x (* (/ (- z y) (- z a)) (- x t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-302) {
		tmp = fma((x - t), ((z - y) / (a - z)), x);
	} else if (t_1 <= 5e-177) {
		tmp = (t * (y - z)) / (a - z);
	} else {
		tmp = x - (((z - y) / (z - a)) * (x - t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -1e-302)
		tmp = fma(Float64(x - t), Float64(Float64(z - y) / Float64(a - z)), x);
	elseif (t_1 <= 5e-177)
		tmp = Float64(Float64(t * Float64(y - z)) / Float64(a - z));
	else
		tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(z - a)) * Float64(x - t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-302], N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 5e-177], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-302}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-177}:\\
\;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e-177

    1. Initial program 79.9%

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

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

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

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

        \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
      4. lower--.f6439.7

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

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

    if 5e-177 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
      14. metadata-eval83.6

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

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

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

Alternative 6: 85.5% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-302}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-177}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x t) (/ (- z y) (- a z)) x))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_2 -1e-302)
     t_1
     (if (<= t_2 5e-177) (/ (* t (- y z)) (- a z)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - t), ((z - y) / (a - z)), x);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -1e-302) {
		tmp = t_1;
	} else if (t_2 <= 5e-177) {
		tmp = (t * (y - z)) / (a - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - t), Float64(Float64(z - y) / Float64(a - z)), x)
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_2 <= -1e-302)
		tmp = t_1;
	elseif (t_2 <= 5e-177)
		tmp = Float64(Float64(t * Float64(y - z)) / Float64(a - z));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-302], t$95$1, If[LessEqual[t$95$2, 5e-177], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-177}:\\
\;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303 or 5e-177 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e-177

    1. Initial program 79.9%

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

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

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

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

        \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
      4. lower--.f6439.7

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

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

Alternative 7: 74.2% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := \mathsf{fma}\left(x - t, \frac{y}{z - a}, x\right)\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+78}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x t) (/ y (- z a)) x)))
   (if (<= y -5.4e+129)
     t_1
     (if (<= y 3.2e+78) (fma (/ (- y z) (- a z)) t x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - t), (y / (z - a)), x);
	double tmp;
	if (y <= -5.4e+129) {
		tmp = t_1;
	} else if (y <= 3.2e+78) {
		tmp = fma(((y - z) / (a - z)), t, x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - t), Float64(y / Float64(z - a)), x)
	tmp = 0.0
	if (y <= -5.4e+129)
		tmp = t_1;
	elseif (y <= 3.2e+78)
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -5.4e+129], t$95$1, If[LessEqual[y, 3.2e+78], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y}{z - a}, x\right)\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.4000000000000002e129 or 3.19999999999999994e78 < y

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
      3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000002e129 < y < 3.19999999999999994e78

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 72.1% accurate, 0.7× speedup?

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

      1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
        3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.2000000000000001e-13 < y < 5.4e-207

      1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.4e-207 < y < 3.19999999999999994e78

        1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\frac{t}{a - z}}\right), z - y, x\right) \]
            12. distribute-neg-frac2N/A

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

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

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

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

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

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

        Alternative 9: 70.0% accurate, 0.8× speedup?

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

          1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
            3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -5.2000000000000001e-13 < y < 1.76e78

          1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 65.0% accurate, 0.8× speedup?

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

            1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{x - t}}{z - a}, y - z, x\right) \]
              3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.1999999999999998e61 < a < 3.4999999999999999e-33

            1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z - y}}{a - z}, x\right) \]
              3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{z - a}} \cdot \left(y - z\right), x\right) \]
              14. metadata-eval83.6

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

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

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

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

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

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

          Alternative 11: 62.1% accurate, 0.7× speedup?

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

            1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{x - t}}{z - a}, y - z, x\right) \]
              3. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.4500000000000001e60 < a < -6.79999999999999993e-296

            1. Initial program 79.9%

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

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

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

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

                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
              4. lower--.f6439.7

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

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

            if -6.79999999999999993e-296 < a < 1.45999999999999998e-68

            1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(y - z\right)} \cdot \left(t - x\right), x\right) \]
              16. sub-negate-revN/A

                \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(\mathsf{neg}\left(\left(z - y\right)\right)\right)} \cdot \left(t - x\right), x\right) \]
              17. distribute-lft-neg-outN/A

                \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\mathsf{neg}\left(\left(z - y\right) \cdot \left(t - x\right)\right)}, x\right) \]
              18. distribute-rgt-neg-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 59.3% accurate, 0.6× speedup?

          \[\begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y - z}}\\ \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+86}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (+ x (/ t (/ a (- y z))))))
             (if (<= a -2e+60)
               t_1
               (if (<= a -6.8e-296)
                 (/ (* t (- y z)) (- a z))
                 (if (<= a 6.5e-67)
                   (/ (* y (- x t)) (- z a))
                   (if (<= a 3.2e+86) (+ x (* (- t x) (/ y a))) t_1))))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = x + (t / (a / (y - z)));
          	double tmp;
          	if (a <= -2e+60) {
          		tmp = t_1;
          	} else if (a <= -6.8e-296) {
          		tmp = (t * (y - z)) / (a - z);
          	} else if (a <= 6.5e-67) {
          		tmp = (y * (x - t)) / (z - a);
          	} else if (a <= 3.2e+86) {
          		tmp = x + ((t - x) * (y / a));
          	} 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 + (t / (a / (y - z)))
              if (a <= (-2d+60)) then
                  tmp = t_1
              else if (a <= (-6.8d-296)) then
                  tmp = (t * (y - z)) / (a - z)
              else if (a <= 6.5d-67) then
                  tmp = (y * (x - t)) / (z - a)
              else if (a <= 3.2d+86) then
                  tmp = x + ((t - x) * (y / a))
              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 + (t / (a / (y - z)));
          	double tmp;
          	if (a <= -2e+60) {
          		tmp = t_1;
          	} else if (a <= -6.8e-296) {
          		tmp = (t * (y - z)) / (a - z);
          	} else if (a <= 6.5e-67) {
          		tmp = (y * (x - t)) / (z - a);
          	} else if (a <= 3.2e+86) {
          		tmp = x + ((t - x) * (y / a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = x + (t / (a / (y - z)))
          	tmp = 0
          	if a <= -2e+60:
          		tmp = t_1
          	elif a <= -6.8e-296:
          		tmp = (t * (y - z)) / (a - z)
          	elif a <= 6.5e-67:
          		tmp = (y * (x - t)) / (z - a)
          	elif a <= 3.2e+86:
          		tmp = x + ((t - x) * (y / a))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(x + Float64(t / Float64(a / Float64(y - z))))
          	tmp = 0.0
          	if (a <= -2e+60)
          		tmp = t_1;
          	elseif (a <= -6.8e-296)
          		tmp = Float64(Float64(t * Float64(y - z)) / Float64(a - z));
          	elseif (a <= 6.5e-67)
          		tmp = Float64(Float64(y * Float64(x - t)) / Float64(z - a));
          	elseif (a <= 3.2e+86)
          		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = x + (t / (a / (y - z)));
          	tmp = 0.0;
          	if (a <= -2e+60)
          		tmp = t_1;
          	elseif (a <= -6.8e-296)
          		tmp = (t * (y - z)) / (a - z);
          	elseif (a <= 6.5e-67)
          		tmp = (y * (x - t)) / (z - a);
          	elseif (a <= 3.2e+86)
          		tmp = x + ((t - x) * (y / a));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+60], t$95$1, If[LessEqual[a, -6.8e-296], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-67], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+86], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          t_1 := x + \frac{t}{\frac{a}{y - z}}\\
          \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;a \leq -6.8 \cdot 10^{-296}:\\
          \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\
          
          \mathbf{elif}\;a \leq 6.5 \cdot 10^{-67}:\\
          \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\
          
          \mathbf{elif}\;a \leq 3.2 \cdot 10^{+86}:\\
          \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if a < -1.9999999999999999e60 or 3.2e86 < a

            1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                18. lower-*.f6455.8

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

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

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

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

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

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

                  \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                6. lift--.f64N/A

                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                7. sub-negate-revN/A

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

                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                9. distribute-neg-frac2N/A

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

                  \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                11. div-flip-revN/A

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

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

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

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

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

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

                  \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                18. lower--.f6467.2

                  \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
              5. Applied rewrites67.2%

                \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
              6. Taylor expanded in z around 0

                \[\leadsto x + \frac{t}{\frac{\color{blue}{a}}{y - z}} \]
              7. Step-by-step derivation
                1. Applied rewrites45.2%

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

                if -1.9999999999999999e60 < a < -6.79999999999999993e-296

                1. Initial program 79.9%

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

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

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

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

                    \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                  4. lower--.f6439.7

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

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

                if -6.79999999999999993e-296 < a < 6.4999999999999997e-67

                1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(y - z\right)} \cdot \left(t - x\right), x\right) \]
                  16. sub-negate-revN/A

                    \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(\mathsf{neg}\left(\left(z - y\right)\right)\right)} \cdot \left(t - x\right), x\right) \]
                  17. distribute-lft-neg-outN/A

                    \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\mathsf{neg}\left(\left(z - y\right) \cdot \left(t - x\right)\right)}, x\right) \]
                  18. distribute-rgt-neg-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 6.4999999999999997e-67 < a < 3.2e86

                1. Initial program 79.9%

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

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

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

                    \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                  3. lower--.f6443.7

                    \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                4. Applied rewrites43.7%

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

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

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

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

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

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

                    \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(y \cdot \frac{1}{a}\right)} \]
                  7. mult-flip-revN/A

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

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

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

              Alternative 13: 59.0% accurate, 0.7× speedup?

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

                1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

                    if -1.9999999999999999e60 < a < -6.79999999999999993e-296

                    1. Initial program 79.9%

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

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

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

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

                        \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                      4. lower--.f6439.7

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

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

                    if -6.79999999999999993e-296 < a < 6.4999999999999997e-67

                    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(y - z\right)} \cdot \left(t - x\right), x\right) \]
                      16. sub-negate-revN/A

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(\mathsf{neg}\left(\left(z - y\right)\right)\right)} \cdot \left(t - x\right), x\right) \]
                      17. distribute-lft-neg-outN/A

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\mathsf{neg}\left(\left(z - y\right) \cdot \left(t - x\right)\right)}, x\right) \]
                      18. distribute-rgt-neg-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 6.4999999999999997e-67 < a

                    1. Initial program 79.9%

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

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

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

                        \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                      3. lower--.f6443.7

                        \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                    4. Applied rewrites43.7%

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

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

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

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

                        \[\leadsto x + \left(\left(t - x\right) \cdot y\right) \cdot \frac{\color{blue}{1}}{a} \]
                      5. associate-*l*N/A

                        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(y \cdot \frac{1}{a}\right)} \]
                      6. lower-*.f64N/A

                        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(y \cdot \frac{1}{a}\right)} \]
                      7. mult-flip-revN/A

                        \[\leadsto x + \left(t - x\right) \cdot \frac{y}{\color{blue}{a}} \]
                      8. lower-/.f6448.0

                        \[\leadsto x + \left(t - x\right) \cdot \frac{y}{\color{blue}{a}} \]
                    6. Applied rewrites48.0%

                      \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} \]
                  4. Recombined 4 regimes into one program.
                  5. Add Preprocessing

                  Alternative 14: 59.0% accurate, 0.7× speedup?

                  \[\begin{array}{l} t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\ \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-16}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (let* ((t_1 (fma (/ t a) (- y z) x)))
                     (if (<= a -2e+60)
                       t_1
                       (if (<= a -6.8e-296)
                         (/ (* t (- y z)) (- a z))
                         (if (<= a 1.2e-16) (/ (* y (- x t)) (- z a)) t_1)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double t_1 = fma((t / a), (y - z), x);
                  	double tmp;
                  	if (a <= -2e+60) {
                  		tmp = t_1;
                  	} else if (a <= -6.8e-296) {
                  		tmp = (t * (y - z)) / (a - z);
                  	} else if (a <= 1.2e-16) {
                  		tmp = (y * (x - t)) / (z - a);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a)
                  	t_1 = fma(Float64(t / a), Float64(y - z), x)
                  	tmp = 0.0
                  	if (a <= -2e+60)
                  		tmp = t_1;
                  	elseif (a <= -6.8e-296)
                  		tmp = Float64(Float64(t * Float64(y - z)) / Float64(a - z));
                  	elseif (a <= 1.2e-16)
                  		tmp = Float64(Float64(y * Float64(x - t)) / Float64(z - a));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2e+60], t$95$1, If[LessEqual[a, -6.8e-296], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-16], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
                  \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;a \leq -6.8 \cdot 10^{-296}:\\
                  \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\
                  
                  \mathbf{elif}\;a \leq 1.2 \cdot 10^{-16}:\\
                  \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if a < -1.9999999999999999e60 or 1.20000000000000002e-16 < a

                    1. Initial program 79.9%

                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                    2. Taylor expanded in x around 0

                      \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                    3. Step-by-step derivation
                      1. Applied rewrites64.2%

                        \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                      2. Taylor expanded in z around 0

                        \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites44.1%

                          \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a}} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a} + x} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a}} + x \]
                          4. *-commutativeN/A

                            \[\leadsto \color{blue}{\frac{t}{a} \cdot \left(y - z\right)} + x \]
                          5. lower-fma.f6444.1

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]
                        3. Applied rewrites44.1%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]

                        if -1.9999999999999999e60 < a < -6.79999999999999993e-296

                        1. Initial program 79.9%

                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                        2. Taylor expanded in x around 0

                          \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{t \cdot \left(y - z\right)}{\color{blue}{a - z}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \frac{t \cdot \left(y - z\right)}{\color{blue}{a} - z} \]
                          3. lower--.f64N/A

                            \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                          4. lower--.f6439.7

                            \[\leadsto \frac{t \cdot \left(y - z\right)}{a - \color{blue}{z}} \]
                        4. Applied rewrites39.7%

                          \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]

                        if -6.79999999999999993e-296 < a < 1.20000000000000002e-16

                        1. Initial program 79.9%

                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                          4. lift-/.f64N/A

                            \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a - z}} + x \]
                          5. mult-flipN/A

                            \[\leadsto \left(y - z\right) \cdot \color{blue}{\left(\left(t - x\right) \cdot \frac{1}{a - z}\right)} + x \]
                          6. associate-*r*N/A

                            \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}} + x \]
                          7. *-commutativeN/A

                            \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
                          8. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
                          9. frac-2negN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          10. metadata-evalN/A

                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(a - z\right)\right)}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          11. lower-/.f64N/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{\mathsf{neg}\left(\left(a - z\right)\right)}}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          12. lift--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          13. sub-negate-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{z - a}}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          14. lower--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{z - a}}, \left(y - z\right) \cdot \left(t - x\right), x\right) \]
                          15. lift--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(y - z\right)} \cdot \left(t - x\right), x\right) \]
                          16. sub-negate-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(\mathsf{neg}\left(\left(z - y\right)\right)\right)} \cdot \left(t - x\right), x\right) \]
                          17. distribute-lft-neg-outN/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\mathsf{neg}\left(\left(z - y\right) \cdot \left(t - x\right)\right)}, x\right) \]
                          18. distribute-rgt-neg-outN/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(z - y\right) \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)}, x\right) \]
                          19. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(z - y\right) \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)}, x\right) \]
                          20. lower--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \color{blue}{\left(z - y\right)} \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right), x\right) \]
                          21. lift--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \left(z - y\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right)}\right)\right), x\right) \]
                          22. sub-negate-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \left(z - y\right) \cdot \color{blue}{\left(x - t\right)}, x\right) \]
                          23. lower--.f6468.1

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{z - a}, \left(z - y\right) \cdot \color{blue}{\left(x - t\right)}, x\right) \]
                        3. Applied rewrites68.1%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{z - a}, \left(z - y\right) \cdot \left(x - t\right), x\right)} \]
                        4. Taylor expanded in y around -inf

                          \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z - a}} \]
                        5. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z - a}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z} - a} \]
                          3. lower--.f64N/A

                            \[\leadsto \frac{y \cdot \left(x - t\right)}{z - a} \]
                          4. lower--.f6438.5

                            \[\leadsto \frac{y \cdot \left(x - t\right)}{z - \color{blue}{a}} \]
                        6. Applied rewrites38.5%

                          \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z - a}} \]
                      4. Recombined 3 regimes into one program.
                      5. Add Preprocessing

                      Alternative 15: 56.6% accurate, 0.9× speedup?

                      \[\begin{array}{l} t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\ \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-90}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (let* ((t_1 (fma (/ t a) (- y z) x)))
                         (if (<= a -2e+60) t_1 (if (<= a 5.6e-90) (/ (* t (- y z)) (- a z)) t_1))))
                      double code(double x, double y, double z, double t, double a) {
                      	double t_1 = fma((t / a), (y - z), x);
                      	double tmp;
                      	if (a <= -2e+60) {
                      		tmp = t_1;
                      	} else if (a <= 5.6e-90) {
                      		tmp = (t * (y - z)) / (a - z);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	t_1 = fma(Float64(t / a), Float64(y - z), x)
                      	tmp = 0.0
                      	if (a <= -2e+60)
                      		tmp = t_1;
                      	elseif (a <= 5.6e-90)
                      		tmp = Float64(Float64(t * Float64(y - z)) / Float64(a - z));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2e+60], t$95$1, If[LessEqual[a, 5.6e-90], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
                      \mathbf{if}\;a \leq -2 \cdot 10^{+60}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;a \leq 5.6 \cdot 10^{-90}:\\
                      \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if a < -1.9999999999999999e60 or 5.5999999999999998e-90 < a

                        1. Initial program 79.9%

                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                        2. Taylor expanded in x around 0

                          \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                        3. Step-by-step derivation
                          1. Applied rewrites64.2%

                            \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                          2. Taylor expanded in z around 0

                            \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                          3. Step-by-step derivation
                            1. Applied rewrites44.1%

                              \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a}} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a} + x} \]
                              3. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a}} + x \]
                              4. *-commutativeN/A

                                \[\leadsto \color{blue}{\frac{t}{a} \cdot \left(y - z\right)} + x \]
                              5. lower-fma.f6444.1

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]
                            3. Applied rewrites44.1%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]

                            if -1.9999999999999999e60 < a < 5.5999999999999998e-90

                            1. Initial program 79.9%

                              \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                            2. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
                            3. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{t \cdot \left(y - z\right)}{\color{blue}{a - z}} \]
                              2. lower-*.f64N/A

                                \[\leadsto \frac{t \cdot \left(y - z\right)}{\color{blue}{a} - z} \]
                              3. lower--.f64N/A

                                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                              4. lower--.f6439.7

                                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - \color{blue}{z}} \]
                            4. Applied rewrites39.7%

                              \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
                          4. Recombined 2 regimes into one program.
                          5. Add Preprocessing

                          Alternative 16: 50.6% accurate, 0.9× speedup?

                          \[\begin{array}{l} \mathbf{if}\;z \leq -1.55:\\ \;\;\;\;x + \frac{t}{1}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+129}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right)\\ \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= z -1.55)
                             (+ x (/ t 1.0))
                             (if (<= z 4.5e+129) (fma (/ t a) (- y z) x) (+ x (- t x)))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (z <= -1.55) {
                          		tmp = x + (t / 1.0);
                          	} else if (z <= 4.5e+129) {
                          		tmp = fma((t / a), (y - z), x);
                          	} else {
                          		tmp = x + (t - x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (z <= -1.55)
                          		tmp = Float64(x + Float64(t / 1.0));
                          	elseif (z <= 4.5e+129)
                          		tmp = fma(Float64(t / a), Float64(y - z), x);
                          	else
                          		tmp = Float64(x + Float64(t - x));
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55], N[(x + N[(t / 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+129], N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -1.55:\\
                          \;\;\;\;x + \frac{t}{1}\\
                          
                          \mathbf{elif}\;z \leq 4.5 \cdot 10^{+129}:\\
                          \;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x + \left(t - x\right)\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if z < -1.55000000000000004

                            1. Initial program 79.9%

                              \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                            2. Taylor expanded in x around 0

                              \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                            3. Step-by-step derivation
                              1. Applied rewrites64.2%

                                \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                              2. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                2. lift-/.f64N/A

                                  \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                3. associate-*r/N/A

                                  \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
                                4. frac-2negN/A

                                  \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \]
                                5. lift--.f64N/A

                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \]
                                6. sub-negate-revN/A

                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                7. lift--.f64N/A

                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                8. div-flipN/A

                                  \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                9. metadata-evalN/A

                                  \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                10. lower-unsound-/.f64N/A

                                  \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                11. metadata-evalN/A

                                  \[\leadsto x + \frac{\color{blue}{1}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                12. lower-unsound-/.f64N/A

                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                13. *-commutativeN/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{t \cdot \left(y - z\right)}\right)}} \]
                                14. distribute-rgt-neg-inN/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}}} \]
                                15. lift--.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)}} \]
                                16. sub-negate-revN/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                17. lift--.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                18. lower-*.f6455.8

                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                              3. Applied rewrites55.8%

                                \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                              4. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                2. lift-/.f64N/A

                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                3. lift-*.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                4. *-commutativeN/A

                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{\left(z - y\right) \cdot t}}} \]
                                5. associate-/r*N/A

                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                                6. lift--.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                                7. sub-negate-revN/A

                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{t}} \]
                                8. lift--.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                                9. distribute-neg-frac2N/A

                                  \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}}{t}} \]
                                10. lift-/.f64N/A

                                  \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                                11. div-flip-revN/A

                                  \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                12. lower-/.f64N/A

                                  \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                13. lift-/.f64N/A

                                  \[\leadsto x + \frac{t}{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)} \]
                                14. distribute-neg-fracN/A

                                  \[\leadsto x + \frac{t}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{y - z}}} \]
                                15. lift--.f64N/A

                                  \[\leadsto x + \frac{t}{\frac{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)}{y - z}} \]
                                16. sub-negate-revN/A

                                  \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                17. lower-/.f64N/A

                                  \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                                18. lower--.f6467.2

                                  \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                              5. Applied rewrites67.2%

                                \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
                              6. Taylor expanded in z around inf

                                \[\leadsto x + \frac{t}{\color{blue}{1}} \]
                              7. Step-by-step derivation
                                1. Applied rewrites33.3%

                                  \[\leadsto x + \frac{t}{\color{blue}{1}} \]

                                if -1.55000000000000004 < z < 4.5000000000000001e129

                                1. Initial program 79.9%

                                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites64.2%

                                    \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                  2. Taylor expanded in z around 0

                                    \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites44.1%

                                      \[\leadsto x + \left(y - z\right) \cdot \frac{t}{\color{blue}{a}} \]
                                    2. Step-by-step derivation
                                      1. lift-+.f64N/A

                                        \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a}} \]
                                      2. +-commutativeN/A

                                        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a} + x} \]
                                      3. lift-*.f64N/A

                                        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a}} + x \]
                                      4. *-commutativeN/A

                                        \[\leadsto \color{blue}{\frac{t}{a} \cdot \left(y - z\right)} + x \]
                                      5. lower-fma.f6444.1

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]
                                    3. Applied rewrites44.1%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)} \]

                                    if 4.5000000000000001e129 < z

                                    1. Initial program 79.9%

                                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                    2. Taylor expanded in z around inf

                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                    3. Step-by-step derivation
                                      1. lower--.f6419.1

                                        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                    4. Applied rewrites19.1%

                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  4. Recombined 3 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 17: 49.7% accurate, 1.0× speedup?

                                  \[\begin{array}{l} t_1 := x + \frac{t}{1}\\ \mathbf{if}\;z \leq -8:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+78}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (let* ((t_1 (+ x (/ t 1.0))))
                                     (if (<= z -8.0) t_1 (if (<= z 1.25e+78) (+ x (/ t (/ a y))) t_1))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double t_1 = x + (t / 1.0);
                                  	double tmp;
                                  	if (z <= -8.0) {
                                  		tmp = t_1;
                                  	} else if (z <= 1.25e+78) {
                                  		tmp = x + (t / (a / y));
                                  	} 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 + (t / 1.0d0)
                                      if (z <= (-8.0d0)) then
                                          tmp = t_1
                                      else if (z <= 1.25d+78) then
                                          tmp = x + (t / (a / y))
                                      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 + (t / 1.0);
                                  	double tmp;
                                  	if (z <= -8.0) {
                                  		tmp = t_1;
                                  	} else if (z <= 1.25e+78) {
                                  		tmp = x + (t / (a / y));
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	t_1 = x + (t / 1.0)
                                  	tmp = 0
                                  	if z <= -8.0:
                                  		tmp = t_1
                                  	elif z <= 1.25e+78:
                                  		tmp = x + (t / (a / y))
                                  	else:
                                  		tmp = t_1
                                  	return tmp
                                  
                                  function code(x, y, z, t, a)
                                  	t_1 = Float64(x + Float64(t / 1.0))
                                  	tmp = 0.0
                                  	if (z <= -8.0)
                                  		tmp = t_1;
                                  	elseif (z <= 1.25e+78)
                                  		tmp = Float64(x + Float64(t / Float64(a / y)));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a)
                                  	t_1 = x + (t / 1.0);
                                  	tmp = 0.0;
                                  	if (z <= -8.0)
                                  		tmp = t_1;
                                  	elseif (z <= 1.25e+78)
                                  		tmp = x + (t / (a / y));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.0], t$95$1, If[LessEqual[z, 1.25e+78], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  t_1 := x + \frac{t}{1}\\
                                  \mathbf{if}\;z \leq -8:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;z \leq 1.25 \cdot 10^{+78}:\\
                                  \;\;\;\;x + \frac{t}{\frac{a}{y}}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -8 or 1.24999999999999996e78 < z

                                    1. Initial program 79.9%

                                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites64.2%

                                        \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                      2. Step-by-step derivation
                                        1. lift-*.f64N/A

                                          \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                        2. lift-/.f64N/A

                                          \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                        3. associate-*r/N/A

                                          \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
                                        4. frac-2negN/A

                                          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \]
                                        5. lift--.f64N/A

                                          \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \]
                                        6. sub-negate-revN/A

                                          \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                        7. lift--.f64N/A

                                          \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                        8. div-flipN/A

                                          \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                        9. metadata-evalN/A

                                          \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                        10. lower-unsound-/.f64N/A

                                          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                        11. metadata-evalN/A

                                          \[\leadsto x + \frac{\color{blue}{1}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                        12. lower-unsound-/.f64N/A

                                          \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                        13. *-commutativeN/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{t \cdot \left(y - z\right)}\right)}} \]
                                        14. distribute-rgt-neg-inN/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}}} \]
                                        15. lift--.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)}} \]
                                        16. sub-negate-revN/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                        17. lift--.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                        18. lower-*.f6455.8

                                          \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                      3. Applied rewrites55.8%

                                        \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                      4. Step-by-step derivation
                                        1. lift-/.f64N/A

                                          \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                        2. lift-/.f64N/A

                                          \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                        3. lift-*.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                        4. *-commutativeN/A

                                          \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{\left(z - y\right) \cdot t}}} \]
                                        5. associate-/r*N/A

                                          \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                                        6. lift--.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                                        7. sub-negate-revN/A

                                          \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{t}} \]
                                        8. lift--.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                                        9. distribute-neg-frac2N/A

                                          \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}}{t}} \]
                                        10. lift-/.f64N/A

                                          \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                                        11. div-flip-revN/A

                                          \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                        12. lower-/.f64N/A

                                          \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                        13. lift-/.f64N/A

                                          \[\leadsto x + \frac{t}{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)} \]
                                        14. distribute-neg-fracN/A

                                          \[\leadsto x + \frac{t}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{y - z}}} \]
                                        15. lift--.f64N/A

                                          \[\leadsto x + \frac{t}{\frac{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)}{y - z}} \]
                                        16. sub-negate-revN/A

                                          \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                        17. lower-/.f64N/A

                                          \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                                        18. lower--.f6467.2

                                          \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                      5. Applied rewrites67.2%

                                        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
                                      6. Taylor expanded in z around inf

                                        \[\leadsto x + \frac{t}{\color{blue}{1}} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites33.3%

                                          \[\leadsto x + \frac{t}{\color{blue}{1}} \]

                                        if -8 < z < 1.24999999999999996e78

                                        1. Initial program 79.9%

                                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                        2. Taylor expanded in x around 0

                                          \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites64.2%

                                            \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                          2. Step-by-step derivation
                                            1. lift-*.f64N/A

                                              \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                            2. lift-/.f64N/A

                                              \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                            3. associate-*r/N/A

                                              \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
                                            4. frac-2negN/A

                                              \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \]
                                            5. lift--.f64N/A

                                              \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \]
                                            6. sub-negate-revN/A

                                              \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                            7. lift--.f64N/A

                                              \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                            8. div-flipN/A

                                              \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                            9. metadata-evalN/A

                                              \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                            10. lower-unsound-/.f64N/A

                                              \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                            11. metadata-evalN/A

                                              \[\leadsto x + \frac{\color{blue}{1}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                            12. lower-unsound-/.f64N/A

                                              \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                            13. *-commutativeN/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{t \cdot \left(y - z\right)}\right)}} \]
                                            14. distribute-rgt-neg-inN/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}}} \]
                                            15. lift--.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)}} \]
                                            16. sub-negate-revN/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                            17. lift--.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                            18. lower-*.f6455.8

                                              \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                          3. Applied rewrites55.8%

                                            \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                          4. Step-by-step derivation
                                            1. lift-/.f64N/A

                                              \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                            2. lift-/.f64N/A

                                              \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                            3. lift-*.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                            4. *-commutativeN/A

                                              \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{\left(z - y\right) \cdot t}}} \]
                                            5. associate-/r*N/A

                                              \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                                            6. lift--.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                                            7. sub-negate-revN/A

                                              \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{t}} \]
                                            8. lift--.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                                            9. distribute-neg-frac2N/A

                                              \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}}{t}} \]
                                            10. lift-/.f64N/A

                                              \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                                            11. div-flip-revN/A

                                              \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                            12. lower-/.f64N/A

                                              \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                            13. lift-/.f64N/A

                                              \[\leadsto x + \frac{t}{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)} \]
                                            14. distribute-neg-fracN/A

                                              \[\leadsto x + \frac{t}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{y - z}}} \]
                                            15. lift--.f64N/A

                                              \[\leadsto x + \frac{t}{\frac{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)}{y - z}} \]
                                            16. sub-negate-revN/A

                                              \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                            17. lower-/.f64N/A

                                              \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                                            18. lower--.f6467.2

                                              \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                          5. Applied rewrites67.2%

                                            \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
                                          6. Taylor expanded in z around 0

                                            \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]
                                          7. Step-by-step derivation
                                            1. lower-/.f6440.7

                                              \[\leadsto x + \frac{t}{\frac{a}{\color{blue}{y}}} \]
                                          8. Applied rewrites40.7%

                                            \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]
                                        4. Recombined 2 regimes into one program.
                                        5. Add Preprocessing

                                        Alternative 18: 47.8% accurate, 1.0× speedup?

                                        \[\begin{array}{l} t_1 := x + \frac{t}{1}\\ \mathbf{if}\;z \leq -8:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                        (FPCore (x y z t a)
                                         :precision binary64
                                         (let* ((t_1 (+ x (/ t 1.0))))
                                           (if (<= z -8.0) t_1 (if (<= z 2.05e+77) (+ x (/ (* t y) a)) t_1))))
                                        double code(double x, double y, double z, double t, double a) {
                                        	double t_1 = x + (t / 1.0);
                                        	double tmp;
                                        	if (z <= -8.0) {
                                        		tmp = t_1;
                                        	} else if (z <= 2.05e+77) {
                                        		tmp = x + ((t * y) / a);
                                        	} 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 + (t / 1.0d0)
                                            if (z <= (-8.0d0)) then
                                                tmp = t_1
                                            else if (z <= 2.05d+77) then
                                                tmp = x + ((t * y) / a)
                                            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 + (t / 1.0);
                                        	double tmp;
                                        	if (z <= -8.0) {
                                        		tmp = t_1;
                                        	} else if (z <= 2.05e+77) {
                                        		tmp = x + ((t * y) / a);
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a):
                                        	t_1 = x + (t / 1.0)
                                        	tmp = 0
                                        	if z <= -8.0:
                                        		tmp = t_1
                                        	elif z <= 2.05e+77:
                                        		tmp = x + ((t * y) / a)
                                        	else:
                                        		tmp = t_1
                                        	return tmp
                                        
                                        function code(x, y, z, t, a)
                                        	t_1 = Float64(x + Float64(t / 1.0))
                                        	tmp = 0.0
                                        	if (z <= -8.0)
                                        		tmp = t_1;
                                        	elseif (z <= 2.05e+77)
                                        		tmp = Float64(x + Float64(Float64(t * y) / a));
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a)
                                        	t_1 = x + (t / 1.0);
                                        	tmp = 0.0;
                                        	if (z <= -8.0)
                                        		tmp = t_1;
                                        	elseif (z <= 2.05e+77)
                                        		tmp = x + ((t * y) / a);
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.0], t$95$1, If[LessEqual[z, 2.05e+77], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        t_1 := x + \frac{t}{1}\\
                                        \mathbf{if}\;z \leq -8:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;z \leq 2.05 \cdot 10^{+77}:\\
                                        \;\;\;\;x + \frac{t \cdot y}{a}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if z < -8 or 2.05e77 < z

                                          1. Initial program 79.9%

                                            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                          2. Taylor expanded in x around 0

                                            \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites64.2%

                                              \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                            2. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                              2. lift-/.f64N/A

                                                \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                              3. associate-*r/N/A

                                                \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
                                              4. frac-2negN/A

                                                \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \]
                                              5. lift--.f64N/A

                                                \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \]
                                              6. sub-negate-revN/A

                                                \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                              7. lift--.f64N/A

                                                \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                              8. div-flipN/A

                                                \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                              9. metadata-evalN/A

                                                \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                              10. lower-unsound-/.f64N/A

                                                \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                              11. metadata-evalN/A

                                                \[\leadsto x + \frac{\color{blue}{1}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                              12. lower-unsound-/.f64N/A

                                                \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                              13. *-commutativeN/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{t \cdot \left(y - z\right)}\right)}} \]
                                              14. distribute-rgt-neg-inN/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}}} \]
                                              15. lift--.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)}} \]
                                              16. sub-negate-revN/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                              17. lift--.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                              18. lower-*.f6455.8

                                                \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                            3. Applied rewrites55.8%

                                              \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                            4. Step-by-step derivation
                                              1. lift-/.f64N/A

                                                \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                              2. lift-/.f64N/A

                                                \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                              3. lift-*.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                              4. *-commutativeN/A

                                                \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{\left(z - y\right) \cdot t}}} \]
                                              5. associate-/r*N/A

                                                \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                                              6. lift--.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                                              7. sub-negate-revN/A

                                                \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{t}} \]
                                              8. lift--.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                                              9. distribute-neg-frac2N/A

                                                \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}}{t}} \]
                                              10. lift-/.f64N/A

                                                \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                                              11. div-flip-revN/A

                                                \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                              12. lower-/.f64N/A

                                                \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                              13. lift-/.f64N/A

                                                \[\leadsto x + \frac{t}{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)} \]
                                              14. distribute-neg-fracN/A

                                                \[\leadsto x + \frac{t}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{y - z}}} \]
                                              15. lift--.f64N/A

                                                \[\leadsto x + \frac{t}{\frac{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)}{y - z}} \]
                                              16. sub-negate-revN/A

                                                \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                              17. lower-/.f64N/A

                                                \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                                              18. lower--.f6467.2

                                                \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                            5. Applied rewrites67.2%

                                              \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
                                            6. Taylor expanded in z around inf

                                              \[\leadsto x + \frac{t}{\color{blue}{1}} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites33.3%

                                                \[\leadsto x + \frac{t}{\color{blue}{1}} \]

                                              if -8 < z < 2.05e77

                                              1. Initial program 79.9%

                                                \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                              2. Taylor expanded in z around 0

                                                \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
                                              3. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto x + \frac{y \cdot \left(t - x\right)}{\color{blue}{a}} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                                                3. lower--.f6443.7

                                                  \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                                              4. Applied rewrites43.7%

                                                \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
                                              5. Taylor expanded in x around 0

                                                \[\leadsto x + \frac{t \cdot y}{a} \]
                                              6. Step-by-step derivation
                                                1. lower-*.f6438.0

                                                  \[\leadsto x + \frac{t \cdot y}{a} \]
                                              7. Applied rewrites38.0%

                                                \[\leadsto x + \frac{t \cdot y}{a} \]
                                            8. Recombined 2 regimes into one program.
                                            9. Add Preprocessing

                                            Alternative 19: 33.3% accurate, 2.5× speedup?

                                            \[x + \frac{t}{1} \]
                                            (FPCore (x y z t a) :precision binary64 (+ x (/ t 1.0)))
                                            double code(double x, double y, double z, double t, double a) {
                                            	return x + (t / 1.0);
                                            }
                                            
                                            module fmin_fmax_functions
                                                implicit none
                                                private
                                                public fmax
                                                public fmin
                                            
                                                interface fmax
                                                    module procedure fmax88
                                                    module procedure fmax44
                                                    module procedure fmax84
                                                    module procedure fmax48
                                                end interface
                                                interface fmin
                                                    module procedure fmin88
                                                    module procedure fmin44
                                                    module procedure fmin84
                                                    module procedure fmin48
                                                end interface
                                            contains
                                                real(8) function fmax88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmax44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmax84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmax48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmin44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmin48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                end function
                                            end module
                                            
                                            real(8) function code(x, y, z, t, 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 + (t / 1.0d0)
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a) {
                                            	return x + (t / 1.0);
                                            }
                                            
                                            def code(x, y, z, t, a):
                                            	return x + (t / 1.0)
                                            
                                            function code(x, y, z, t, a)
                                            	return Float64(x + Float64(t / 1.0))
                                            end
                                            
                                            function tmp = code(x, y, z, t, a)
                                            	tmp = x + (t / 1.0);
                                            end
                                            
                                            code[x_, y_, z_, t_, a_] := N[(x + N[(t / 1.0), $MachinePrecision]), $MachinePrecision]
                                            
                                            x + \frac{t}{1}
                                            
                                            Derivation
                                            1. Initial program 79.9%

                                              \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                            2. Taylor expanded in x around 0

                                              \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites64.2%

                                                \[\leadsto x + \left(y - z\right) \cdot \frac{\color{blue}{t}}{a - z} \]
                                              2. Step-by-step derivation
                                                1. lift-*.f64N/A

                                                  \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                                2. lift-/.f64N/A

                                                  \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                                3. associate-*r/N/A

                                                  \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
                                                4. frac-2negN/A

                                                  \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \]
                                                5. lift--.f64N/A

                                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \]
                                                6. sub-negate-revN/A

                                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                                7. lift--.f64N/A

                                                  \[\leadsto x + \frac{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}{\color{blue}{z - a}} \]
                                                8. div-flipN/A

                                                  \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                                9. metadata-evalN/A

                                                  \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                                10. lower-unsound-/.f64N/A

                                                  \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                                11. metadata-evalN/A

                                                  \[\leadsto x + \frac{\color{blue}{1}}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}} \]
                                                12. lower-unsound-/.f64N/A

                                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{\mathsf{neg}\left(\left(y - z\right) \cdot t\right)}}} \]
                                                13. *-commutativeN/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{t \cdot \left(y - z\right)}\right)}} \]
                                                14. distribute-rgt-neg-inN/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}}} \]
                                                15. lift--.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)}} \]
                                                16. sub-negate-revN/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                                17. lift--.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{t \cdot \color{blue}{\left(z - y\right)}}} \]
                                                18. lower-*.f6455.8

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                              3. Applied rewrites55.8%

                                                \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                              4. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto x + \color{blue}{\frac{1}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                                2. lift-/.f64N/A

                                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{z - a}{t \cdot \left(z - y\right)}}} \]
                                                3. lift-*.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{t \cdot \left(z - y\right)}}} \]
                                                4. *-commutativeN/A

                                                  \[\leadsto x + \frac{1}{\frac{z - a}{\color{blue}{\left(z - y\right) \cdot t}}} \]
                                                5. associate-/r*N/A

                                                  \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{z - y}}{t}}} \]
                                                6. lift--.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{z - y}}}{t}} \]
                                                7. sub-negate-revN/A

                                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{t}} \]
                                                8. lift--.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{t}} \]
                                                9. distribute-neg-frac2N/A

                                                  \[\leadsto x + \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}}{t}} \]
                                                10. lift-/.f64N/A

                                                  \[\leadsto x + \frac{1}{\frac{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)}{t}} \]
                                                11. div-flip-revN/A

                                                  \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                                12. lower-/.f64N/A

                                                  \[\leadsto x + \color{blue}{\frac{t}{\mathsf{neg}\left(\frac{z - a}{y - z}\right)}} \]
                                                13. lift-/.f64N/A

                                                  \[\leadsto x + \frac{t}{\mathsf{neg}\left(\color{blue}{\frac{z - a}{y - z}}\right)} \]
                                                14. distribute-neg-fracN/A

                                                  \[\leadsto x + \frac{t}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{y - z}}} \]
                                                15. lift--.f64N/A

                                                  \[\leadsto x + \frac{t}{\frac{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)}{y - z}} \]
                                                16. sub-negate-revN/A

                                                  \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                                17. lower-/.f64N/A

                                                  \[\leadsto x + \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
                                                18. lower--.f6467.2

                                                  \[\leadsto x + \frac{t}{\frac{\color{blue}{a - z}}{y - z}} \]
                                              5. Applied rewrites67.2%

                                                \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
                                              6. Taylor expanded in z around inf

                                                \[\leadsto x + \frac{t}{\color{blue}{1}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites33.3%

                                                  \[\leadsto x + \frac{t}{\color{blue}{1}} \]
                                                2. Add Preprocessing

                                                Alternative 20: 19.1% accurate, 2.8× speedup?

                                                \[x + \left(t - x\right) \]
                                                (FPCore (x y z t a) :precision binary64 (+ x (- t x)))
                                                double code(double x, double y, double z, double t, double a) {
                                                	return x + (t - x);
                                                }
                                                
                                                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 + (t - x)
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a) {
                                                	return x + (t - x);
                                                }
                                                
                                                def code(x, y, z, t, a):
                                                	return x + (t - x)
                                                
                                                function code(x, y, z, t, a)
                                                	return Float64(x + Float64(t - x))
                                                end
                                                
                                                function tmp = code(x, y, z, t, a)
                                                	tmp = x + (t - x);
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
                                                
                                                x + \left(t - x\right)
                                                
                                                Derivation
                                                1. Initial program 79.9%

                                                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                2. Taylor expanded in z around inf

                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                3. Step-by-step derivation
                                                  1. lower--.f6419.1

                                                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                4. Applied rewrites19.1%

                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                5. Add Preprocessing

                                                Alternative 21: 2.8% accurate, 3.8× speedup?

                                                \[\left(-x\right) + x \]
                                                (FPCore (x y z t a) :precision binary64 (+ (- x) x))
                                                double code(double x, double y, double z, double t, double a) {
                                                	return -x + x;
                                                }
                                                
                                                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 + x
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a) {
                                                	return -x + x;
                                                }
                                                
                                                def code(x, y, z, t, a):
                                                	return -x + x
                                                
                                                function code(x, y, z, t, a)
                                                	return Float64(Float64(-x) + x)
                                                end
                                                
                                                function tmp = code(x, y, z, t, a)
                                                	tmp = -x + x;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
                                                
                                                \left(-x\right) + x
                                                
                                                Derivation
                                                1. Initial program 79.9%

                                                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                2. Taylor expanded in z around inf

                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                3. Step-by-step derivation
                                                  1. lower--.f6419.1

                                                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                4. Applied rewrites19.1%

                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                5. Taylor expanded in x around inf

                                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                6. Step-by-step derivation
                                                  1. lower-*.f642.8

                                                    \[\leadsto x + -1 \cdot x \]
                                                7. Applied rewrites2.8%

                                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                8. Step-by-step derivation
                                                  1. lift-+.f64N/A

                                                    \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                  2. +-commutativeN/A

                                                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                  3. lower-+.f642.8

                                                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                  4. lift-*.f64N/A

                                                    \[\leadsto -1 \cdot x + x \]
                                                  5. mul-1-negN/A

                                                    \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                  6. lower-neg.f642.8

                                                    \[\leadsto \left(-x\right) + x \]
                                                9. Applied rewrites2.8%

                                                  \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                10. Add Preprocessing

                                                Reproduce

                                                ?
                                                herbie shell --seed 2025172 
                                                (FPCore (x y z t a)
                                                  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                                                  :precision binary64
                                                  (+ x (* (- y z) (/ (- t x) (- a z)))))