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

Percentage Accurate: 68.2% → 90.7%
Time: 5.9s
Alternatives: 19
Speedup: 1.0×

Specification

?
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 19 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}

Alternative 1: 90.7% accurate, 0.3× speedup?

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.3× speedup?

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.8% accurate, 0.7× speedup?

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-206}:\\
\;\;\;\;x - \frac{z}{a - z} \cdot \left(t - x\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.0000000000000001e-62 or 1.4500000000000001e-206 < y

    1. Initial program 68.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)} \]
      8. 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) \]
      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(\color{blue}{\frac{x - t}{\mathsf{neg}\left(\left(a - z\right)\right)}}, y - z, x\right) \]
      12. lower--.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(\frac{x - t}{\color{blue}{z - a}}, y - z, x\right) \]
      15. 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)} \]

    if -3.0000000000000001e-62 < y < 1.4500000000000001e-206

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 73.4% accurate, 0.6× speedup?

    \[\begin{array}{l} t_1 := \mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\ t_2 := \left(x - t\right) \cdot \frac{y}{z - a}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-206}:\\ \;\;\;\;x - \frac{z}{a - z} \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (- z y) (/ t (- z a)) x)) (t_2 (* (- x t) (/ y (- z a)))))
       (if (<= y -6.5e+129)
         t_2
         (if (<= y -3.6e-26)
           t_1
           (if (<= y 2.35e-206)
             (- x (* (/ z (- a z)) (- t x)))
             (if (<= y 2.5e+147) t_1 t_2))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((z - y), (t / (z - a)), x);
    	double t_2 = (x - t) * (y / (z - a));
    	double tmp;
    	if (y <= -6.5e+129) {
    		tmp = t_2;
    	} else if (y <= -3.6e-26) {
    		tmp = t_1;
    	} else if (y <= 2.35e-206) {
    		tmp = x - ((z / (a - z)) * (t - x));
    	} else if (y <= 2.5e+147) {
    		tmp = t_1;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(z - y), Float64(t / Float64(z - a)), x)
    	t_2 = Float64(Float64(x - t) * Float64(y / Float64(z - a)))
    	tmp = 0.0
    	if (y <= -6.5e+129)
    		tmp = t_2;
    	elseif (y <= -3.6e-26)
    		tmp = t_1;
    	elseif (y <= 2.35e-206)
    		tmp = Float64(x - Float64(Float64(z / Float64(a - z)) * Float64(t - x)));
    	elseif (y <= 2.5e+147)
    		tmp = t_1;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+129], t$95$2, If[LessEqual[y, -3.6e-26], t$95$1, If[LessEqual[y, 2.35e-206], N[(x - N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+147], t$95$1, t$95$2]]]]]]
    
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\
    t_2 := \left(x - t\right) \cdot \frac{y}{z - a}\\
    \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;y \leq -3.6 \cdot 10^{-26}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 2.35 \cdot 10^{-206}:\\
    \;\;\;\;x - \frac{z}{a - z} \cdot \left(t - x\right)\\
    
    \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -6.4999999999999995e129 or 2.5000000000000001e147 < y

      1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
        6. sub-divN/A

          \[\leadsto \frac{t - x}{a - z} \cdot y \]
        7. lift--.f64N/A

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

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

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

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

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

          \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
        13. times-fracN/A

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

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

          \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
        16. sub-negate-revN/A

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

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

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

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

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

          \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
        22. lower--.f64N/A

          \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
        23. lower-/.f6437.8

          \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
      6. Applied rewrites37.8%

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

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

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

          \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
        4. frac-timesN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x - t\right) \cdot \frac{y}{\mathsf{neg}\left(\left(1 - \frac{z}{a}\right) \cdot a\right)} \]
        14. sub-to-mult-revN/A

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

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

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

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

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

      if -6.4999999999999995e129 < y < -3.6000000000000001e-26 or 2.3499999999999999e-206 < y < 2.5000000000000001e147

      1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{x - \frac{z - y}{a - z} \cdot t} \]
          2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.6000000000000001e-26 < y < 2.3499999999999999e-206

        1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 71.4% accurate, 0.6× speedup?

        \[\begin{array}{l} t_1 := \mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\ t_2 := \left(x - t\right) \cdot \frac{y}{z - a}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-206}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, t - x, x\right)\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (fma (- z y) (/ t (- z a)) x)) (t_2 (* (- x t) (/ y (- z a)))))
           (if (<= y -6.5e+129)
             t_2
             (if (<= y -3.6e-26)
               t_1
               (if (<= y 2.35e-206)
                 (fma (/ z (- z a)) (- t x) x)
                 (if (<= y 2.5e+147) t_1 t_2))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = fma((z - y), (t / (z - a)), x);
        	double t_2 = (x - t) * (y / (z - a));
        	double tmp;
        	if (y <= -6.5e+129) {
        		tmp = t_2;
        	} else if (y <= -3.6e-26) {
        		tmp = t_1;
        	} else if (y <= 2.35e-206) {
        		tmp = fma((z / (z - a)), (t - x), x);
        	} else if (y <= 2.5e+147) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a)
        	t_1 = fma(Float64(z - y), Float64(t / Float64(z - a)), x)
        	t_2 = Float64(Float64(x - t) * Float64(y / Float64(z - a)))
        	tmp = 0.0
        	if (y <= -6.5e+129)
        		tmp = t_2;
        	elseif (y <= -3.6e-26)
        		tmp = t_1;
        	elseif (y <= 2.35e-206)
        		tmp = fma(Float64(z / Float64(z - a)), Float64(t - x), x);
        	elseif (y <= 2.5e+147)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+129], t$95$2, If[LessEqual[y, -3.6e-26], t$95$1, If[LessEqual[y, 2.35e-206], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[y, 2.5e+147], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\
        t_2 := \left(x - t\right) \cdot \frac{y}{z - a}\\
        \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;y \leq -3.6 \cdot 10^{-26}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 2.35 \cdot 10^{-206}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, t - x, x\right)\\
        
        \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -6.4999999999999995e129 or 2.5000000000000001e147 < y

          1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
            6. sub-divN/A

              \[\leadsto \frac{t - x}{a - z} \cdot y \]
            7. lift--.f64N/A

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

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

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

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

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

              \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
            13. times-fracN/A

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

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

              \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
            16. sub-negate-revN/A

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

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

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

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

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

              \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
            22. lower--.f64N/A

              \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
            23. lower-/.f6437.8

              \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
          6. Applied rewrites37.8%

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

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

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

              \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
            4. frac-timesN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(x - t\right) \cdot \frac{y}{\mathsf{neg}\left(\left(1 - \frac{z}{a}\right) \cdot a\right)} \]
            14. sub-to-mult-revN/A

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

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

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

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

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

          if -6.4999999999999995e129 < y < -3.6000000000000001e-26 or 2.3499999999999999e-206 < y < 2.5000000000000001e147

          1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{x - \frac{z - y}{a - z} \cdot t} \]
              2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.6000000000000001e-26 < y < 2.3499999999999999e-206

            1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 71.3% accurate, 0.8× speedup?

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

              1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                6. sub-divN/A

                  \[\leadsto \frac{t - x}{a - z} \cdot y \]
                7. lift--.f64N/A

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

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

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

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

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

                  \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                13. times-fracN/A

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

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

                  \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                16. sub-negate-revN/A

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

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

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

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

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

                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                22. lower--.f64N/A

                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                23. lower-/.f6437.8

                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
              6. Applied rewrites37.8%

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

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

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

                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                4. frac-timesN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(x - t\right) \cdot \frac{y}{\mathsf{neg}\left(\left(1 - \frac{z}{a}\right) \cdot a\right)} \]
                14. sub-to-mult-revN/A

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

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

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

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

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

              if -6.4999999999999995e129 < y < 2.4e84

              1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 71.1% accurate, 0.8× speedup?

              \[\begin{array}{l} t_1 := \left(x - t\right) \cdot \frac{y}{z - a}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\ \;\;\;\;\mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (let* ((t_1 (* (- x t) (/ y (- z a)))))
                 (if (<= y -6.5e+129)
                   t_1
                   (if (<= y 2.5e+147) (fma (- z y) (/ t (- z a)) x) t_1))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = (x - t) * (y / (z - a));
              	double tmp;
              	if (y <= -6.5e+129) {
              		tmp = t_1;
              	} else if (y <= 2.5e+147) {
              		tmp = fma((z - y), (t / (z - a)), x);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	t_1 = Float64(Float64(x - t) * Float64(y / Float64(z - a)))
              	tmp = 0.0
              	if (y <= -6.5e+129)
              		tmp = t_1;
              	elseif (y <= 2.5e+147)
              		tmp = fma(Float64(z - y), Float64(t / Float64(z - a)), 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]), $MachinePrecision]}, If[LessEqual[y, -6.5e+129], t$95$1, If[LessEqual[y, 2.5e+147], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              t_1 := \left(x - t\right) \cdot \frac{y}{z - a}\\
              \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;y \leq 2.5 \cdot 10^{+147}:\\
              \;\;\;\;\mathsf{fma}\left(z - y, \frac{t}{z - a}, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y < -6.4999999999999995e129 or 2.5000000000000001e147 < y

                1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                  6. sub-divN/A

                    \[\leadsto \frac{t - x}{a - z} \cdot y \]
                  7. lift--.f64N/A

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

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

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

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

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

                    \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                  13. times-fracN/A

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

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

                    \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                  16. sub-negate-revN/A

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

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

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

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

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

                    \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                  22. lower--.f64N/A

                    \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                  23. lower-/.f6437.8

                    \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                6. Applied rewrites37.8%

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

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

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

                    \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                  4. frac-timesN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(x - t\right) \cdot \frac{y}{\mathsf{neg}\left(\left(1 - \frac{z}{a}\right) \cdot a\right)} \]
                  14. sub-to-mult-revN/A

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

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

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

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

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

                if -6.4999999999999995e129 < y < 2.5000000000000001e147

                1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x - \frac{z - y}{a - z} \cdot t} \]
                    2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 67.8% accurate, 0.8× speedup?

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

                  1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto t \cdot \frac{z - y}{\color{blue}{z} - a} \]
                    5. sub-negate-revN/A

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

                      \[\leadsto t \cdot \frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z - a} \]
                    7. mul-1-negN/A

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

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

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

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

                      \[\leadsto \left(\frac{-1}{z - a} \cdot \left(y - z\right)\right) \cdot \color{blue}{t} \]
                    12. lower-*.f6451.4

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

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

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

                      \[\leadsto \frac{-1 \cdot \left(y - z\right)}{z - a} \cdot t \]
                    16. mul-1-negN/A

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

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

                      \[\leadsto \frac{z - y}{z - a} \cdot t \]
                    19. lift--.f64N/A

                      \[\leadsto \frac{z - y}{z - a} \cdot t \]
                    20. lower-/.f6451.5

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

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

                  if -1.55000000000000004 < z < 2.39999999999999998e82

                  1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 65.6% accurate, 0.9× speedup?

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

                    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                      6. sub-divN/A

                        \[\leadsto \frac{t - x}{a - z} \cdot y \]
                      7. lift--.f64N/A

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

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

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

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

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

                        \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                      13. times-fracN/A

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

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

                        \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                      16. sub-negate-revN/A

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

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

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

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

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

                        \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                      22. lower--.f64N/A

                        \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                      23. lower-/.f6437.8

                        \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                    6. Applied rewrites37.8%

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

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

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

                        \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                      4. frac-timesN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(x - t\right) \cdot \frac{y}{\mathsf{neg}\left(\left(1 - \frac{z}{a}\right) \cdot a\right)} \]
                      14. sub-to-mult-revN/A

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

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

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

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

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

                    if -6.7000000000000003e125 < y < 1.76e78

                    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 12: 65.3% accurate, 0.9× speedup?

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

                        1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto t \cdot \frac{z - y}{\color{blue}{z} - a} \]
                          5. sub-negate-revN/A

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

                            \[\leadsto t \cdot \frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z - a} \]
                          7. mul-1-negN/A

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

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

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

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

                            \[\leadsto \left(\frac{-1}{z - a} \cdot \left(y - z\right)\right) \cdot \color{blue}{t} \]
                          12. lower-*.f6451.4

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

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

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

                            \[\leadsto \frac{-1 \cdot \left(y - z\right)}{z - a} \cdot t \]
                          16. mul-1-negN/A

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

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

                            \[\leadsto \frac{z - y}{z - a} \cdot t \]
                          19. lift--.f64N/A

                            \[\leadsto \frac{z - y}{z - a} \cdot t \]
                          20. lower-/.f6451.5

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

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

                        if -1550 < z < 4.5999999999999997e75

                        1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 13: 61.8% accurate, 0.9× speedup?

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

                        1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1550 < z < 4.5999999999999997e75

                        1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 14: 55.8% accurate, 0.7× speedup?

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

                        1. Initial program 68.2%

                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                          \[\leadsto x + t \]
                        6. Step-by-step derivation
                          1. Applied rewrites33.3%

                            \[\leadsto x + t \]

                          if -3.9000000000000001e81 < z < -1600 or 5.99999999999999978e82 < z

                          1. Initial program 68.2%

                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 -1600 < z < 5.99999999999999978e82

                          1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 15: 54.1% accurate, 0.8× speedup?

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

                          1. Initial program 68.2%

                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                            \[\leadsto x + t \]
                          6. Step-by-step derivation
                            1. Applied rewrites33.3%

                              \[\leadsto x + t \]

                            if -3.9000000000000001e81 < z < -1.75

                            1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{t \cdot \left(z - y\right)}{z} \]
                              3. lower--.f6426.8

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

                              \[\leadsto \frac{t \cdot \left(z - y\right)}{\color{blue}{z}} \]

                            if -1.75 < z < 5.99999999999999978e82

                            1. Initial program 68.2%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
                              3. lift-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
                              4. mult-flipN/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}} + x \]
                              5. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)} \cdot \frac{1}{a - z} + x \]
                              6. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(\left(t - x\right) \cdot \left(y - z\right)\right)} \cdot \frac{1}{a - z} + x \]
                              7. associate-*l*N/A

                                \[\leadsto \color{blue}{\left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{1}{a - z}\right)} + x \]
                              8. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} + x \]
                              9. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
                              10. mult-flip-revN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
                              11. frac-2negN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}}, t - x, x\right) \]
                              12. lift--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              13. sub-negate-revN/A

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              14. lower-/.f64N/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{\mathsf{neg}\left(\left(a - z\right)\right)}}, t - x, x\right) \]
                              15. lower--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              16. lift--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}, t - x, x\right) \]
                              17. sub-negate-revN/A

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z - a}}, t - x, x\right) \]
                              18. lower--.f6483.7

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z - a}}, t - x, x\right) \]
                            3. Applied rewrites83.7%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)} \]
                            4. Taylor expanded in z around 0

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, t - x, x\right) \]
                            5. Step-by-step derivation
                              1. lower-/.f6448.0

                                \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{a}}, t - x, x\right) \]
                            6. Applied rewrites48.0%

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, t - x, x\right) \]

                            if 5.99999999999999978e82 < z

                            1. Initial program 68.2%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
                              3. lift-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
                              4. mult-flipN/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}} + x \]
                              5. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)} \cdot \frac{1}{a - z} + x \]
                              6. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(\left(t - x\right) \cdot \left(y - z\right)\right)} \cdot \frac{1}{a - z} + x \]
                              7. associate-*l*N/A

                                \[\leadsto \color{blue}{\left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{1}{a - z}\right)} + x \]
                              8. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} + x \]
                              9. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
                              10. mult-flip-revN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
                              11. frac-2negN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}}, t - x, x\right) \]
                              12. lift--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              13. sub-negate-revN/A

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              14. lower-/.f64N/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{\mathsf{neg}\left(\left(a - z\right)\right)}}, t - x, x\right) \]
                              15. lower--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)}, t - x, x\right) \]
                              16. lift--.f64N/A

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}, t - x, x\right) \]
                              17. sub-negate-revN/A

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z - a}}, t - x, x\right) \]
                              18. lower--.f6483.7

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z - a}}, t - x, x\right) \]
                            3. Applied rewrites83.7%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)} \]
                            4. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{t \cdot \left(z - y\right)}{z - a}} \]
                            5. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{t \cdot \left(z - y\right)}{\color{blue}{z - a}} \]
                              2. lower-*.f64N/A

                                \[\leadsto \frac{t \cdot \left(z - y\right)}{\color{blue}{z} - a} \]
                              3. lower--.f64N/A

                                \[\leadsto \frac{t \cdot \left(z - y\right)}{z - a} \]
                              4. lower--.f6439.7

                                \[\leadsto \frac{t \cdot \left(z - y\right)}{z - \color{blue}{a}} \]
                            6. Applied rewrites39.7%

                              \[\leadsto \color{blue}{\frac{t \cdot \left(z - y\right)}{z - a}} \]
                            7. Taylor expanded in y around 0

                              \[\leadsto \frac{t \cdot z}{\color{blue}{z} - a} \]
                            8. Step-by-step derivation
                              1. lower-*.f6421.2

                                \[\leadsto \frac{t \cdot z}{z - a} \]
                            9. Applied rewrites21.2%

                              \[\leadsto \frac{t \cdot z}{\color{blue}{z} - a} \]
                          7. Recombined 4 regimes into one program.
                          8. Add Preprocessing

                          Alternative 16: 42.4% accurate, 1.0× speedup?

                          \[\begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+84}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= y -6.5e+129)
                             (/ (* y (- x t)) z)
                             (if (<= y 2.4e+84) (+ x t) (* y (/ (- t x) a)))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (y <= -6.5e+129) {
                          		tmp = (y * (x - t)) / z;
                          	} else if (y <= 2.4e+84) {
                          		tmp = x + t;
                          	} else {
                          		tmp = y * ((t - x) / a);
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: tmp
                              if (y <= (-6.5d+129)) then
                                  tmp = (y * (x - t)) / z
                              else if (y <= 2.4d+84) then
                                  tmp = x + t
                              else
                                  tmp = y * ((t - x) / a)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (y <= -6.5e+129) {
                          		tmp = (y * (x - t)) / z;
                          	} else if (y <= 2.4e+84) {
                          		tmp = x + t;
                          	} else {
                          		tmp = y * ((t - x) / a);
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if y <= -6.5e+129:
                          		tmp = (y * (x - t)) / z
                          	elif y <= 2.4e+84:
                          		tmp = x + t
                          	else:
                          		tmp = y * ((t - x) / a)
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (y <= -6.5e+129)
                          		tmp = Float64(Float64(y * Float64(x - t)) / z);
                          	elseif (y <= 2.4e+84)
                          		tmp = Float64(x + t);
                          	else
                          		tmp = Float64(y * Float64(Float64(t - x) / a));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (y <= -6.5e+129)
                          		tmp = (y * (x - t)) / z;
                          	elseif (y <= 2.4e+84)
                          		tmp = x + t;
                          	else
                          		tmp = y * ((t - x) / a);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.5e+129], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.4e+84], N[(x + t), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\
                          \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
                          
                          \mathbf{elif}\;y \leq 2.4 \cdot 10^{+84}:\\
                          \;\;\;\;x + t\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;y \cdot \frac{t - x}{a}\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if y < -6.4999999999999995e129

                            1. Initial program 68.2%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Taylor expanded in y around inf

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                              3. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                              4. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                              5. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                              6. lower--.f6442.2

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                            4. Applied rewrites42.2%

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            5. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. *-commutativeN/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                              3. lift--.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              4. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              5. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              6. sub-divN/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              7. lift--.f64N/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              8. associate-*l/N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                              9. lift--.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{a - \color{blue}{z}} \]
                              10. sub-to-mult-revN/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot \color{blue}{a}} \]
                              11. lift-/.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                              12. lift--.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                              13. times-fracN/A

                                \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \color{blue}{\frac{y}{a}} \]
                              14. lower-*.f64N/A

                                \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \color{blue}{\frac{y}{a}} \]
                              15. lift--.f64N/A

                                \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                              16. sub-negate-revN/A

                                \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                              17. lift--.f64N/A

                                \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                              18. sub-negate-revN/A

                                \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(\frac{z}{a} - 1\right)\right)} \cdot \frac{y}{a} \]
                              19. frac-2neg-revN/A

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{\color{blue}{y}}{a} \]
                              20. lower-/.f64N/A

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{\color{blue}{y}}{a} \]
                              21. lower--.f64N/A

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                              22. lower--.f64N/A

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                              23. lower-/.f6437.8

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                            6. Applied rewrites37.8%

                              \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \color{blue}{\frac{y}{a}} \]
                            7. Taylor expanded in z around inf

                              \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]
                            8. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                              2. lower-*.f64N/A

                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                              3. lower--.f6424.4

                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                            9. Applied rewrites24.4%

                              \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]

                            if -6.4999999999999995e129 < y < 2.4e84

                            1. Initial program 68.2%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                              \[\leadsto x + t \]
                            6. Step-by-step derivation
                              1. Applied rewrites33.3%

                                \[\leadsto x + t \]

                              if 2.4e84 < y

                              1. Initial program 68.2%

                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                              2. Taylor expanded in y around inf

                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                2. lower--.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                3. lower-/.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                4. lower--.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                5. lower-/.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                6. lower--.f6442.2

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                              4. Applied rewrites42.2%

                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              5. Taylor expanded in a around inf

                                \[\leadsto y \cdot \frac{t - x}{\color{blue}{a}} \]
                              6. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto y \cdot \frac{t - x}{a} \]
                                2. lower--.f6425.5

                                  \[\leadsto y \cdot \frac{t - x}{a} \]
                              7. Applied rewrites25.5%

                                \[\leadsto y \cdot \frac{t - x}{\color{blue}{a}} \]
                            7. Recombined 3 regimes into one program.
                            8. Add Preprocessing

                            Alternative 17: 41.6% accurate, 1.0× speedup?

                            \[\begin{array}{l} t_1 := \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.76 \cdot 10^{+78}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (let* ((t_1 (/ (* y (- x t)) z)))
                               (if (<= y -6.5e+129) t_1 (if (<= y 1.76e+78) (+ x t) t_1))))
                            double code(double x, double y, double z, double t, double a) {
                            	double t_1 = (y * (x - t)) / z;
                            	double tmp;
                            	if (y <= -6.5e+129) {
                            		tmp = t_1;
                            	} else if (y <= 1.76e+78) {
                            		tmp = x + t;
                            	} 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 = (y * (x - t)) / z
                                if (y <= (-6.5d+129)) then
                                    tmp = t_1
                                else if (y <= 1.76d+78) then
                                    tmp = x + t
                                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 = (y * (x - t)) / z;
                            	double tmp;
                            	if (y <= -6.5e+129) {
                            		tmp = t_1;
                            	} else if (y <= 1.76e+78) {
                            		tmp = x + t;
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	t_1 = (y * (x - t)) / z
                            	tmp = 0
                            	if y <= -6.5e+129:
                            		tmp = t_1
                            	elif y <= 1.76e+78:
                            		tmp = x + t
                            	else:
                            		tmp = t_1
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	t_1 = Float64(Float64(y * Float64(x - t)) / z)
                            	tmp = 0.0
                            	if (y <= -6.5e+129)
                            		tmp = t_1;
                            	elseif (y <= 1.76e+78)
                            		tmp = Float64(x + t);
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	t_1 = (y * (x - t)) / z;
                            	tmp = 0.0;
                            	if (y <= -6.5e+129)
                            		tmp = t_1;
                            	elseif (y <= 1.76e+78)
                            		tmp = x + t;
                            	else
                            		tmp = t_1;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -6.5e+129], t$95$1, If[LessEqual[y, 1.76e+78], N[(x + t), $MachinePrecision], t$95$1]]]
                            
                            \begin{array}{l}
                            t_1 := \frac{y \cdot \left(x - t\right)}{z}\\
                            \mathbf{if}\;y \leq -6.5 \cdot 10^{+129}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;y \leq 1.76 \cdot 10^{+78}:\\
                            \;\;\;\;x + t\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -6.4999999999999995e129 or 1.76e78 < y

                              1. Initial program 68.2%

                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                              2. Taylor expanded in y around inf

                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                2. lower--.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                3. lower-/.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                4. lower--.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                5. lower-/.f64N/A

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                6. lower--.f6442.2

                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                              4. Applied rewrites42.2%

                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              5. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                2. *-commutativeN/A

                                  \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                                3. lift--.f64N/A

                                  \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                                4. lift-/.f64N/A

                                  \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                                5. lift-/.f64N/A

                                  \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                                6. sub-divN/A

                                  \[\leadsto \frac{t - x}{a - z} \cdot y \]
                                7. lift--.f64N/A

                                  \[\leadsto \frac{t - x}{a - z} \cdot y \]
                                8. associate-*l/N/A

                                  \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                                9. lift--.f64N/A

                                  \[\leadsto \frac{\left(t - x\right) \cdot y}{a - \color{blue}{z}} \]
                                10. sub-to-mult-revN/A

                                  \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot \color{blue}{a}} \]
                                11. lift-/.f64N/A

                                  \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                                12. lift--.f64N/A

                                  \[\leadsto \frac{\left(t - x\right) \cdot y}{\left(1 - \frac{z}{a}\right) \cdot a} \]
                                13. times-fracN/A

                                  \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \color{blue}{\frac{y}{a}} \]
                                14. lower-*.f64N/A

                                  \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \color{blue}{\frac{y}{a}} \]
                                15. lift--.f64N/A

                                  \[\leadsto \frac{t - x}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                                16. sub-negate-revN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                                17. lift--.f64N/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{1 - \frac{z}{a}} \cdot \frac{y}{a} \]
                                18. sub-negate-revN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(\frac{z}{a} - 1\right)\right)} \cdot \frac{y}{a} \]
                                19. frac-2neg-revN/A

                                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{\color{blue}{y}}{a} \]
                                20. lower-/.f64N/A

                                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{\color{blue}{y}}{a} \]
                                21. lower--.f64N/A

                                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                                22. lower--.f64N/A

                                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{a} \]
                                23. lower-/.f6437.8

                                  \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \frac{y}{\color{blue}{a}} \]
                              6. Applied rewrites37.8%

                                \[\leadsto \frac{x - t}{\frac{z}{a} - 1} \cdot \color{blue}{\frac{y}{a}} \]
                              7. Taylor expanded in z around inf

                                \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]
                              8. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                                3. lower--.f6424.4

                                  \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                              9. Applied rewrites24.4%

                                \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]

                              if -6.4999999999999995e129 < y < 1.76e78

                              1. Initial program 68.2%

                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                                \[\leadsto x + t \]
                              6. Step-by-step derivation
                                1. Applied rewrites33.3%

                                  \[\leadsto x + t \]
                              7. Recombined 2 regimes into one program.
                              8. Add Preprocessing

                              Alternative 18: 36.9% accurate, 1.3× speedup?

                              \[\begin{array}{l} \mathbf{if}\;y \leq 1.76 \cdot 10^{+78}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a - z}\\ \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (<= y 1.76e+78) (+ x t) (/ (* t y) (- a z))))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (y <= 1.76e+78) {
                              		tmp = x + t;
                              	} else {
                              		tmp = (t * y) / (a - z);
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8) :: tmp
                                  if (y <= 1.76d+78) then
                                      tmp = x + t
                                  else
                                      tmp = (t * y) / (a - z)
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (y <= 1.76e+78) {
                              		tmp = x + t;
                              	} else {
                              		tmp = (t * y) / (a - z);
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if y <= 1.76e+78:
                              		tmp = x + t
                              	else:
                              		tmp = (t * y) / (a - z)
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if (y <= 1.76e+78)
                              		tmp = Float64(x + t);
                              	else
                              		tmp = Float64(Float64(t * y) / Float64(a - z));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if (y <= 1.76e+78)
                              		tmp = x + t;
                              	else
                              		tmp = (t * y) / (a - z);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.76e+78], N[(x + t), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              \mathbf{if}\;y \leq 1.76 \cdot 10^{+78}:\\
                              \;\;\;\;x + t\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{t \cdot y}{a - z}\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if y < 1.76e78

                                1. Initial program 68.2%

                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                                  \[\leadsto x + t \]
                                6. Step-by-step derivation
                                  1. Applied rewrites33.3%

                                    \[\leadsto x + t \]

                                  if 1.76e78 < y

                                  1. Initial program 68.2%

                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                  2. Taylor expanded in y around inf

                                    \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                    2. lower--.f64N/A

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                    3. lower-/.f64N/A

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                    4. lower--.f64N/A

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                    5. lower-/.f64N/A

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                    6. lower--.f6442.2

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                  4. Applied rewrites42.2%

                                    \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                  5. Taylor expanded in x around 0

                                    \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                  6. Step-by-step derivation
                                    1. lower-/.f64N/A

                                      \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \frac{t \cdot y}{a - z} \]
                                    3. lower--.f6421.6

                                      \[\leadsto \frac{t \cdot y}{a - z} \]
                                  7. Applied rewrites21.6%

                                    \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                7. Recombined 2 regimes into one program.
                                8. Add Preprocessing

                                Alternative 19: 33.3% accurate, 4.8× speedup?

                                \[x + t \]
                                (FPCore (x y z t a) :precision binary64 (+ x t))
                                double code(double x, double y, double z, double t, double a) {
                                	return x + t;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, 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
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a) {
                                	return x + t;
                                }
                                
                                def code(x, y, z, t, a):
                                	return x + t
                                
                                function code(x, y, z, t, a)
                                	return Float64(x + t)
                                end
                                
                                function tmp = code(x, y, z, t, a)
                                	tmp = x + t;
                                end
                                
                                code[x_, y_, z_, t_, a_] := N[(x + t), $MachinePrecision]
                                
                                x + t
                                
                                Derivation
                                1. Initial program 68.2%

                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 0

                                  \[\leadsto x + t \]
                                6. Step-by-step derivation
                                  1. Applied rewrites33.3%

                                    \[\leadsto x + t \]
                                  2. Add Preprocessing

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025172 
                                  (FPCore (x y z t a)
                                    :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                    :precision binary64
                                    (+ x (/ (* (- y z) (- t x)) (- a z))))