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

Percentage Accurate: 69.5% → 96.3%
Time: 6.4s
Alternatives: 17
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(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]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 69.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(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]
\begin{array}{l}

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

Alternative 1: 96.3% accurate, 0.7× speedup?

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

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

    \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \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^{+113}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\ \;\;\;\;\mathsf{fma}\left(\left(y - 0\right) - a, x, t \cdot \left(z - y\right)\right) \cdot \frac{1}{z - a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_1 -1e+113)
     (fma (/ (- z y) (- z a)) (- t x) x)
     (if (<= t_1 5e+43)
       (* (fma (- (- y 0.0) a) x (* t (- z y))) (/ 1.0 (- z a)))
       (fma (/ (- x t) (- z a)) (- y z) 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+113) {
		tmp = fma(((z - y) / (z - a)), (t - x), x);
	} else if (t_1 <= 5e+43) {
		tmp = fma(((y - 0.0) - a), x, (t * (z - y))) * (1.0 / (z - a));
	} else {
		tmp = fma(((x - t) / (z - a)), (y - z), 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+113)
		tmp = fma(Float64(Float64(z - y) / Float64(z - a)), Float64(t - x), x);
	elseif (t_1 <= 5e+43)
		tmp = Float64(fma(Float64(Float64(y - 0.0) - a), x, Float64(t * Float64(z - y))) * Float64(1.0 / Float64(z - a)));
	else
		tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), 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+113], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 5e+43], N[(N[(N[(N[(y - 0.0), $MachinePrecision] - a), $MachinePrecision] * x + N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

\\
\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^{+113}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\
\;\;\;\;\mathsf{fma}\left(\left(y - 0\right) - a, x, t \cdot \left(z - y\right)\right) \cdot \frac{1}{z - a}\\

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


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

    1. Initial program 69.5%

      \[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--.f6485.1

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

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

    if -1e113 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000004e43

    1. Initial program 69.5%

      \[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--.f6485.1

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

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

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

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

    1. Initial program 69.5%

      \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1, t, \frac{a - y}{a - z} \cdot x\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.99999999999999953e100 or 3.79999999999999989e110 < z

    1. Initial program 69.5%

      \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.99999999999999953e100 < z < 3.79999999999999989e110

      1. Initial program 69.5%

        \[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--.f6485.1

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

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

    Alternative 4: 86.6% accurate, 0.7× speedup?

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

      1. Initial program 69.5%

        \[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--.f6485.1

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

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

      if -2.1e-171 < t < 3.2000000000000001e-134

      1. Initial program 69.5%

        \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
        7. lower--.f6452.5

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

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

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

          \[\leadsto -1 \cdot \left(\left(\frac{y}{a - z} - \frac{a}{a - z}\right) \cdot \color{blue}{x}\right) \]
        3. lower-*.f6452.5

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{y - a}{a - z} \cdot x\right) \]
        8. --rgt-identityN/A

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{a - \left(y - 0\right)}{z - a} \cdot x\right) \]
        17. --rgt-identityN/A

          \[\leadsto -1 \cdot \left(\frac{a - y}{z - a} \cdot x\right) \]
        18. lower--.f6452.5

          \[\leadsto -1 \cdot \left(\frac{a - y}{z - a} \cdot x\right) \]
      8. Applied rewrites52.5%

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

    Alternative 5: 83.4% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{-157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-55}:\\ \;\;\;\;-1 \cdot \left(\frac{a - y}{z - a} \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (/ (- x t) (- z a)) (- y z) x)))
       (if (<= t -2.9e-157)
         t_1
         (if (<= t 2.9e-55) (* -1.0 (* (/ (- a y) (- z a)) 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 (t <= -2.9e-157) {
    		tmp = t_1;
    	} else if (t <= 2.9e-55) {
    		tmp = -1.0 * (((a - y) / (z - a)) * 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 (t <= -2.9e-157)
    		tmp = t_1;
    	elseif (t <= 2.9e-55)
    		tmp = Float64(-1.0 * Float64(Float64(Float64(a - y) / Float64(z - a)) * 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[t, -2.9e-157], t$95$1, If[LessEqual[t, 2.9e-55], N[(-1.0 * N[(N[(N[(a - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
    \mathbf{if}\;t \leq -2.9 \cdot 10^{-157}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 2.9 \cdot 10^{-55}:\\
    \;\;\;\;-1 \cdot \left(\frac{a - y}{z - a} \cdot x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -2.89999999999999988e-157 or 2.9e-55 < t

      1. Initial program 69.5%

        \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.89999999999999988e-157 < t < 2.9e-55

      1. Initial program 69.5%

        \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
        7. lower--.f6452.5

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

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

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

          \[\leadsto -1 \cdot \left(\left(\frac{y}{a - z} - \frac{a}{a - z}\right) \cdot \color{blue}{x}\right) \]
        3. lower-*.f6452.5

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{y - a}{a - z} \cdot x\right) \]
        8. --rgt-identityN/A

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{a - \left(y - 0\right)}{z - a} \cdot x\right) \]
        17. --rgt-identityN/A

          \[\leadsto -1 \cdot \left(\frac{a - y}{z - a} \cdot x\right) \]
        18. lower--.f6452.5

          \[\leadsto -1 \cdot \left(\frac{a - y}{z - a} \cdot x\right) \]
      8. Applied rewrites52.5%

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

    Alternative 6: 67.6% accurate, 0.8× speedup?

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

      1. Initial program 69.5%

        \[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--.f6485.1

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

        \[\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 rewrites47.5%

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

        if -3.4000000000000001e35 < z < 8.2000000000000001e114

        1. Initial program 69.5%

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

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

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

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

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

        if 8.2000000000000001e114 < z

        1. Initial program 69.5%

          \[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--.f6485.1

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

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

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

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

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

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

      Alternative 7: 67.1% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{z - y}{z}, t - x, x\right)\\ \mathbf{if}\;z \leq -9 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-162}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z - a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-95}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+115}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{x - t}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (fma (/ (- z y) z) (- t x) x)))
         (if (<= z -9e+39)
           t_1
           (if (<= z -1.3e-162)
             (* (- y a) (/ x (- z a)))
             (if (<= z 2.7e-95)
               (fma (/ y a) (- t x) x)
               (if (<= z 2.1e+115) (fma z (/ (- x t) (- a z)) x) t_1))))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = fma(((z - y) / z), (t - x), x);
      	double tmp;
      	if (z <= -9e+39) {
      		tmp = t_1;
      	} else if (z <= -1.3e-162) {
      		tmp = (y - a) * (x / (z - a));
      	} else if (z <= 2.7e-95) {
      		tmp = fma((y / a), (t - x), x);
      	} else if (z <= 2.1e+115) {
      		tmp = fma(z, ((x - t) / (a - z)), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = fma(Float64(Float64(z - y) / z), Float64(t - x), x)
      	tmp = 0.0
      	if (z <= -9e+39)
      		tmp = t_1;
      	elseif (z <= -1.3e-162)
      		tmp = Float64(Float64(y - a) * Float64(x / Float64(z - a)));
      	elseif (z <= 2.7e-95)
      		tmp = fma(Float64(y / a), Float64(t - x), x);
      	elseif (z <= 2.1e+115)
      		tmp = fma(z, Float64(Float64(x - t) / Float64(a - z)), 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] / z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -9e+39], t$95$1, If[LessEqual[z, -1.3e-162], N[(N[(y - a), $MachinePrecision] * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-95], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.1e+115], N[(z * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(\frac{z - y}{z}, t - x, x\right)\\
      \mathbf{if}\;z \leq -9 \cdot 10^{+39}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq -1.3 \cdot 10^{-162}:\\
      \;\;\;\;\left(y - a\right) \cdot \frac{x}{z - a}\\
      
      \mathbf{elif}\;z \leq 2.7 \cdot 10^{-95}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
      
      \mathbf{elif}\;z \leq 2.1 \cdot 10^{+115}:\\
      \;\;\;\;\mathsf{fma}\left(z, \frac{x - t}{a - z}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if z < -8.99999999999999991e39 or 2.10000000000000003e115 < z

        1. Initial program 69.5%

          \[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--.f6485.1

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

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

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

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

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

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

        if -8.99999999999999991e39 < z < -1.3e-162

        1. Initial program 69.5%

          \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
          7. lower--.f6452.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(\left(y - 0\right) - a\right) \]
          17. frac-2negN/A

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

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

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

        if -1.3e-162 < z < 2.7e-95

        1. Initial program 69.5%

          \[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--.f6485.1

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

          \[\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-/.f6450.5

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

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

        if 2.7e-95 < z < 2.10000000000000003e115

        1. Initial program 69.5%

          \[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--.f6485.1

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

          \[\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 rewrites47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 66.4% accurate, 0.8× speedup?

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

          1. Initial program 69.5%

            \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -5.7999999999999997e93 < y < 4.49999999999999984e54

          1. Initial program 69.5%

            \[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--.f6485.1

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

            \[\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 rewrites47.5%

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

            if 4.49999999999999984e54 < y

            1. Initial program 69.5%

              \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x - t}{z - a} \cdot y \]
              18. lower-/.f6441.9

                \[\leadsto \frac{x - t}{z - a} \cdot y \]
            8. Applied rewrites41.9%

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

          Alternative 9: 64.4% accurate, 0.7× speedup?

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

            1. Initial program 69.5%

              \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
              7. lower--.f6452.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(\left(y - 0\right) - a\right) \]
              17. frac-2negN/A

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

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

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

            if -5.2e-23 < x < -2.70000000000000006e-166

            1. Initial program 69.5%

              \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.70000000000000006e-166 < x < 1.2e-31

            1. Initial program 69.5%

              \[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.1

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

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

          Alternative 10: 60.6% accurate, 0.8× speedup?

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

            1. Initial program 69.5%

              \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -5.7999999999999997e93 < y < 2.05e52

            1. Initial program 69.5%

              \[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--.f6485.1

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

              \[\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 rewrites47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.05e52 < y

              1. Initial program 69.5%

                \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x - t}{z - a} \cdot y \]
                18. lower-/.f6441.9

                  \[\leadsto \frac{x - t}{z - a} \cdot y \]
              8. Applied rewrites41.9%

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

            Alternative 11: 58.4% accurate, 0.9× speedup?

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

              1. Initial program 69.5%

                \[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--.f6418.9

                  \[\leadsto x + \left(t - \color{blue}{x}\right) \]
              4. Applied rewrites18.9%

                \[\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 rewrites34.8%

                  \[\leadsto x + t \]

                if -4.39999999999999988e33 < z < 8e114

                1. Initial program 69.5%

                  \[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--.f6485.1

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

                  \[\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-/.f6450.5

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

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

                if 8e114 < z

                1. Initial program 69.5%

                  \[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.1

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

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

              Alternative 12: 58.1% accurate, 0.9× speedup?

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

                1. Initial program 69.5%

                  \[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--.f6418.9

                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                4. Applied rewrites18.9%

                  \[\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 rewrites34.8%

                    \[\leadsto x + t \]

                  if -4.39999999999999988e33 < z < 2.2e115

                  1. Initial program 69.5%

                    \[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--.f6485.1

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

                    \[\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-/.f6450.5

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

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

                  if 2.2e115 < z

                  1. Initial program 69.5%

                    \[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--.f6418.9

                      \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                  4. Applied rewrites18.9%

                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 13: 44.3% accurate, 0.7× speedup?

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

                  1. Initial program 69.5%

                    \[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--.f6485.1

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

                    \[\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 rewrites47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.95e73 < a < -7.00000000000000003e-258 or 9.2000000000000003e-185 < a < 1.06e163

                    1. Initial program 69.5%

                      \[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--.f6418.9

                        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                    4. Applied rewrites18.9%

                      \[\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 rewrites34.8%

                        \[\leadsto x + t \]

                      if -7.00000000000000003e-258 < a < 9.2000000000000003e-185

                      1. Initial program 69.5%

                        \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z - 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--.f6423.6

                          \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                      9. Applied rewrites23.6%

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

                    Alternative 14: 41.9% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(x \cdot -1\right)\\ \mathbf{if}\;a \leq -5.8 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-258}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-185}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+147}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (let* ((t_1 (* -1.0 (* x -1.0))))
                       (if (<= a -5.8e+156)
                         t_1
                         (if (<= a -7e-258)
                           (+ x t)
                           (if (<= a 9.2e-185)
                             (/ (* y (- x t)) z)
                             (if (<= a 2.35e+147) (+ x t) t_1))))))
                    double code(double x, double y, double z, double t, double a) {
                    	double t_1 = -1.0 * (x * -1.0);
                    	double tmp;
                    	if (a <= -5.8e+156) {
                    		tmp = t_1;
                    	} else if (a <= -7e-258) {
                    		tmp = x + t;
                    	} else if (a <= 9.2e-185) {
                    		tmp = (y * (x - t)) / z;
                    	} else if (a <= 2.35e+147) {
                    		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 = (-1.0d0) * (x * (-1.0d0))
                        if (a <= (-5.8d+156)) then
                            tmp = t_1
                        else if (a <= (-7d-258)) then
                            tmp = x + t
                        else if (a <= 9.2d-185) then
                            tmp = (y * (x - t)) / z
                        else if (a <= 2.35d+147) 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 = -1.0 * (x * -1.0);
                    	double tmp;
                    	if (a <= -5.8e+156) {
                    		tmp = t_1;
                    	} else if (a <= -7e-258) {
                    		tmp = x + t;
                    	} else if (a <= 9.2e-185) {
                    		tmp = (y * (x - t)) / z;
                    	} else if (a <= 2.35e+147) {
                    		tmp = x + t;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	t_1 = -1.0 * (x * -1.0)
                    	tmp = 0
                    	if a <= -5.8e+156:
                    		tmp = t_1
                    	elif a <= -7e-258:
                    		tmp = x + t
                    	elif a <= 9.2e-185:
                    		tmp = (y * (x - t)) / z
                    	elif a <= 2.35e+147:
                    		tmp = x + t
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	t_1 = Float64(-1.0 * Float64(x * -1.0))
                    	tmp = 0.0
                    	if (a <= -5.8e+156)
                    		tmp = t_1;
                    	elseif (a <= -7e-258)
                    		tmp = Float64(x + t);
                    	elseif (a <= 9.2e-185)
                    		tmp = Float64(Float64(y * Float64(x - t)) / z);
                    	elseif (a <= 2.35e+147)
                    		tmp = Float64(x + t);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	t_1 = -1.0 * (x * -1.0);
                    	tmp = 0.0;
                    	if (a <= -5.8e+156)
                    		tmp = t_1;
                    	elseif (a <= -7e-258)
                    		tmp = x + t;
                    	elseif (a <= 9.2e-185)
                    		tmp = (y * (x - t)) / z;
                    	elseif (a <= 2.35e+147)
                    		tmp = x + t;
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * N[(x * -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+156], t$95$1, If[LessEqual[a, -7e-258], N[(x + t), $MachinePrecision], If[LessEqual[a, 9.2e-185], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.35e+147], N[(x + t), $MachinePrecision], t$95$1]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := -1 \cdot \left(x \cdot -1\right)\\
                    \mathbf{if}\;a \leq -5.8 \cdot 10^{+156}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;a \leq -7 \cdot 10^{-258}:\\
                    \;\;\;\;x + t\\
                    
                    \mathbf{elif}\;a \leq 9.2 \cdot 10^{-185}:\\
                    \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
                    
                    \mathbf{elif}\;a \leq 2.35 \cdot 10^{+147}:\\
                    \;\;\;\;x + t\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if a < -5.80000000000000021e156 or 2.3500000000000001e147 < a

                      1. Initial program 69.5%

                        \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
                        7. lower--.f6452.5

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

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

                        \[\leadsto -1 \cdot \left(x \cdot -1\right) \]
                      8. Step-by-step derivation
                        1. Applied rewrites26.7%

                          \[\leadsto -1 \cdot \left(x \cdot -1\right) \]

                        if -5.80000000000000021e156 < a < -7.00000000000000003e-258 or 9.2000000000000003e-185 < a < 2.3500000000000001e147

                        1. Initial program 69.5%

                          \[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--.f6418.9

                            \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                        4. Applied rewrites18.9%

                          \[\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 rewrites34.8%

                            \[\leadsto x + t \]

                          if -7.00000000000000003e-258 < a < 9.2000000000000003e-185

                          1. Initial program 69.5%

                            \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z - 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--.f6423.6

                              \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                          9. Applied rewrites23.6%

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

                        Alternative 15: 38.2% accurate, 1.3× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.9 \cdot 10^{+93}:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                        (FPCore (x y z t a)
                         :precision binary64
                         (if (<= y -6.9e+93) (/ (* x y) (- z a)) (+ x t)))
                        double code(double x, double y, double z, double t, double a) {
                        	double tmp;
                        	if (y <= -6.9e+93) {
                        		tmp = (x * y) / (z - a);
                        	} else {
                        		tmp = x + t;
                        	}
                        	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.9d+93)) then
                                tmp = (x * y) / (z - a)
                            else
                                tmp = x + t
                            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.9e+93) {
                        		tmp = (x * y) / (z - a);
                        	} else {
                        		tmp = x + t;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	tmp = 0
                        	if y <= -6.9e+93:
                        		tmp = (x * y) / (z - a)
                        	else:
                        		tmp = x + t
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	tmp = 0.0
                        	if (y <= -6.9e+93)
                        		tmp = Float64(Float64(x * y) / Float64(z - a));
                        	else
                        		tmp = Float64(x + t);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	tmp = 0.0;
                        	if (y <= -6.9e+93)
                        		tmp = (x * y) / (z - a);
                        	else
                        		tmp = x + t;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.9e+93], N[(N[(x * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -6.9 \cdot 10^{+93}:\\
                        \;\;\;\;\frac{x \cdot y}{z - a}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;x + t\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -6.8999999999999995e93

                          1. Initial program 69.5%

                            \[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. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x \cdot y}{\color{blue}{z} - a} \]
                          8. Step-by-step derivation
                            1. lower-*.f6420.9

                              \[\leadsto \frac{x \cdot y}{z - a} \]
                          9. Applied rewrites20.9%

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

                          if -6.8999999999999995e93 < y

                          1. Initial program 69.5%

                            \[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--.f6418.9

                              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                          4. Applied rewrites18.9%

                            \[\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 rewrites34.8%

                              \[\leadsto x + t \]
                          7. Recombined 2 regimes into one program.
                          8. Add Preprocessing

                          Alternative 16: 37.9% accurate, 1.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2200000000:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-111}:\\ \;\;\;\;-1 \cdot \left(x \cdot -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= z -2200000000.0)
                             (+ x t)
                             (if (<= z 3.2e-111) (* -1.0 (* x -1.0)) (+ x t))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (z <= -2200000000.0) {
                          		tmp = x + t;
                          	} else if (z <= 3.2e-111) {
                          		tmp = -1.0 * (x * -1.0);
                          	} else {
                          		tmp = x + t;
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: tmp
                              if (z <= (-2200000000.0d0)) then
                                  tmp = x + t
                              else if (z <= 3.2d-111) then
                                  tmp = (-1.0d0) * (x * (-1.0d0))
                              else
                                  tmp = x + t
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (z <= -2200000000.0) {
                          		tmp = x + t;
                          	} else if (z <= 3.2e-111) {
                          		tmp = -1.0 * (x * -1.0);
                          	} else {
                          		tmp = x + t;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if z <= -2200000000.0:
                          		tmp = x + t
                          	elif z <= 3.2e-111:
                          		tmp = -1.0 * (x * -1.0)
                          	else:
                          		tmp = x + t
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (z <= -2200000000.0)
                          		tmp = Float64(x + t);
                          	elseif (z <= 3.2e-111)
                          		tmp = Float64(-1.0 * Float64(x * -1.0));
                          	else
                          		tmp = Float64(x + t);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (z <= -2200000000.0)
                          		tmp = x + t;
                          	elseif (z <= 3.2e-111)
                          		tmp = -1.0 * (x * -1.0);
                          	else
                          		tmp = x + t;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2200000000.0], N[(x + t), $MachinePrecision], If[LessEqual[z, 3.2e-111], N[(-1.0 * N[(x * -1.0), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -2200000000:\\
                          \;\;\;\;x + t\\
                          
                          \mathbf{elif}\;z \leq 3.2 \cdot 10^{-111}:\\
                          \;\;\;\;-1 \cdot \left(x \cdot -1\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x + t\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -2.2e9 or 3.1999999999999998e-111 < z

                            1. Initial program 69.5%

                              \[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--.f6418.9

                                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                            4. Applied rewrites18.9%

                              \[\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 rewrites34.8%

                                \[\leadsto x + t \]

                              if -2.2e9 < z < 3.1999999999999998e-111

                              1. Initial program 69.5%

                                \[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. add-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto -1 \cdot \left(x \cdot \left(\frac{y}{a - z} - \frac{a}{\color{blue}{a - z}}\right)\right) \]
                                7. lower--.f6452.5

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

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

                                \[\leadsto -1 \cdot \left(x \cdot -1\right) \]
                              8. Step-by-step derivation
                                1. Applied rewrites26.7%

                                  \[\leadsto -1 \cdot \left(x \cdot -1\right) \]
                              9. Recombined 2 regimes into one program.
                              10. Add Preprocessing

                              Alternative 17: 34.8% accurate, 4.8× speedup?

                              \[\begin{array}{l} \\ x + t \end{array} \]
                              (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]
                              
                              \begin{array}{l}
                              
                              \\
                              x + t
                              \end{array}
                              
                              Derivation
                              1. Initial program 69.5%

                                \[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--.f6418.9

                                  \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                              4. Applied rewrites18.9%

                                \[\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 rewrites34.8%

                                  \[\leadsto x + t \]
                                2. Add Preprocessing

                                Reproduce

                                ?
                                herbie shell --seed 2025143 
                                (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))))