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

Percentage Accurate: 67.4% → 91.2%
Time: 5.5s
Alternatives: 14
Speedup: 0.9×

Specification

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

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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: 67.4% accurate, 1.0× speedup?

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

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}

Alternative 1: 91.2% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 45000:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-1, t\_1, \frac{z}{z - a}\right) - \frac{a}{z - a}, \frac{t \cdot \left(z - y\right)}{z - a}\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.7000000000000001e43 or 45000 < t

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e43 < t < 45000

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(-1, \frac{z - y}{z - a}, \frac{z}{z - a}\right) - \frac{a}{z - a}, \frac{t \cdot \left(z - y\right)}{z - a}\right) \]
      14. lower--.f6478.7%

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

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

Alternative 2: 90.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.3% accurate, 0.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{y - z}{a - z} \cdot t\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.8999999999999997e241

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8999999999999997e241 < z

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y - z}{a - z} \cdot t \]
      9. lower-/.f6451.3%

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

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

Alternative 4: 80.1% accurate, 0.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{y - z}{a - z} \cdot t\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 9.4000000000000002e111

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.4000000000000002e111 < z

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y - z}{a - z} \cdot t \]
      9. lower-/.f6451.3%

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

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

Alternative 5: 67.4% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.7999999999999998e41 or 235 < x

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999998e41 < x < 235

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 64.2% accurate, 0.8× speedup?

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

      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.0500000000000001e27 < x < 235

      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{y - z}{a - z} \cdot t \]
        9. lower-/.f6451.3%

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

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

    Alternative 7: 64.0% accurate, 0.9× speedup?

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

      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -4.1e101 < a < 1.1e-41

          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{y - z}{a - z} \cdot t \]
            9. lower-/.f6451.3%

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

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

          if 1.1e-41 < a

          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 62.3% accurate, 0.9× speedup?

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

          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -106 < a < 1.1e-41

              1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

                \[\leadsto t \cdot \left(\frac{y}{a - z} - -1\right) \]
              6. Step-by-step derivation
                1. Applied rewrites41.7%

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

                if 1.1e-41 < a

                1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 60.6% accurate, 0.9× speedup?

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

                1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

                  \[\leadsto t \cdot \left(\frac{y}{a - z} - -1\right) \]
                6. Step-by-step derivation
                  1. Applied rewrites41.7%

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

                    \[\leadsto t \cdot \left(\frac{y}{a} - -1\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites24.5%

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

                      \[\leadsto t \cdot 1 \]
                    3. Step-by-step derivation
                      1. Applied rewrites25.6%

                        \[\leadsto t \cdot 1 \]

                      if -9.9999999999999995e123 < z < 8.9999999999999999e86

                      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 41.0% accurate, 0.8× speedup?

                    \[\begin{array}{l} \mathbf{if}\;a \leq -0.00037:\\ \;\;\;\;t + x\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-107}:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
                    (FPCore (x y z t a)
                      :precision binary64
                      (if (<= a -0.00037)
                      (+ t x)
                      (if (<= a 1.5e-138)
                        (/ (* t (- z y)) z)
                        (if (<= a 1.8e-107) (/ (* x y) (- z a)) (+ t x)))))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (a <= -0.00037) {
                    		tmp = t + x;
                    	} else if (a <= 1.5e-138) {
                    		tmp = (t * (z - y)) / z;
                    	} else if (a <= 1.8e-107) {
                    		tmp = (x * y) / (z - a);
                    	} else {
                    		tmp = t + x;
                    	}
                    	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 (a <= (-0.00037d0)) then
                            tmp = t + x
                        else if (a <= 1.5d-138) then
                            tmp = (t * (z - y)) / z
                        else if (a <= 1.8d-107) then
                            tmp = (x * y) / (z - a)
                        else
                            tmp = t + x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (a <= -0.00037) {
                    		tmp = t + x;
                    	} else if (a <= 1.5e-138) {
                    		tmp = (t * (z - y)) / z;
                    	} else if (a <= 1.8e-107) {
                    		tmp = (x * y) / (z - a);
                    	} else {
                    		tmp = t + x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if a <= -0.00037:
                    		tmp = t + x
                    	elif a <= 1.5e-138:
                    		tmp = (t * (z - y)) / z
                    	elif a <= 1.8e-107:
                    		tmp = (x * y) / (z - a)
                    	else:
                    		tmp = t + x
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (a <= -0.00037)
                    		tmp = Float64(t + x);
                    	elseif (a <= 1.5e-138)
                    		tmp = Float64(Float64(t * Float64(z - y)) / z);
                    	elseif (a <= 1.8e-107)
                    		tmp = Float64(Float64(x * y) / Float64(z - a));
                    	else
                    		tmp = Float64(t + x);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if (a <= -0.00037)
                    		tmp = t + x;
                    	elseif (a <= 1.5e-138)
                    		tmp = (t * (z - y)) / z;
                    	elseif (a <= 1.8e-107)
                    		tmp = (x * y) / (z - a);
                    	else
                    		tmp = t + x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.00037], N[(t + x), $MachinePrecision], If[LessEqual[a, 1.5e-138], N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.8e-107], N[(N[(x * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;a \leq -0.00037:\\
                    \;\;\;\;t + x\\
                    
                    \mathbf{elif}\;a \leq 1.5 \cdot 10^{-138}:\\
                    \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\
                    
                    \mathbf{elif}\;a \leq 1.8 \cdot 10^{-107}:\\
                    \;\;\;\;\frac{x \cdot y}{z - a}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t + x\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if a < -3.6999999999999999e-4 or 1.7999999999999999e-107 < a

                      1. Initial program 67.4%

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

                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                      3. Step-by-step derivation
                        1. lower--.f6419.6%

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

                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                      5. Taylor expanded in x around inf

                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                      6. Step-by-step derivation
                        1. lower-*.f642.8%

                          \[\leadsto x + -1 \cdot x \]
                      7. Applied rewrites2.8%

                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                      8. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{x + -1 \cdot x} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                        3. lower-+.f642.8%

                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                        4. lift-*.f64N/A

                          \[\leadsto -1 \cdot x + x \]
                        5. mul-1-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                        6. lower-neg.f642.8%

                          \[\leadsto \left(-x\right) + x \]
                      9. Applied rewrites2.8%

                        \[\leadsto \color{blue}{\left(-x\right) + x} \]
                      10. Taylor expanded in x around 0

                        \[\leadsto t + x \]
                      11. Step-by-step derivation
                        1. Applied rewrites35.2%

                          \[\leadsto t + x \]

                        if -3.6999999999999999e-4 < a < 1.5e-138

                        1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{t \cdot \left(z - y\right)}{z} \]
                          3. lower--.f6427.0%

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

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

                        if 1.5e-138 < a < 1.7999999999999999e-107

                        1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\left(t - x\right) \cdot y\right) \cdot \color{blue}{\frac{-1}{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-/.f64N/A

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

                            \[\leadsto \frac{x \cdot y}{z - a} \]
                          3. lower--.f6420.6%

                            \[\leadsto \frac{x \cdot y}{z - a} \]
                        9. Applied rewrites20.6%

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

                      Alternative 11: 40.4% accurate, 1.0× speedup?

                      \[\begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{+31}:\\ \;\;\;\;\frac{t \cdot y}{a - z}\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{+171}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \end{array} \]
                      (FPCore (x y z t a)
                        :precision binary64
                        (if (<= y -9.6e+31)
                        (/ (* t y) (- a z))
                        (if (<= y 1.42e+171) (+ t x) (/ (* x y) (- z a)))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (y <= -9.6e+31) {
                      		tmp = (t * y) / (a - z);
                      	} else if (y <= 1.42e+171) {
                      		tmp = t + x;
                      	} else {
                      		tmp = (x * y) / (z - a);
                      	}
                      	return tmp;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8) :: tmp
                          if (y <= (-9.6d+31)) then
                              tmp = (t * y) / (a - z)
                          else if (y <= 1.42d+171) then
                              tmp = t + x
                          else
                              tmp = (x * y) / (z - a)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (y <= -9.6e+31) {
                      		tmp = (t * y) / (a - z);
                      	} else if (y <= 1.42e+171) {
                      		tmp = t + x;
                      	} else {
                      		tmp = (x * y) / (z - a);
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a):
                      	tmp = 0
                      	if y <= -9.6e+31:
                      		tmp = (t * y) / (a - z)
                      	elif y <= 1.42e+171:
                      		tmp = t + x
                      	else:
                      		tmp = (x * y) / (z - a)
                      	return tmp
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if (y <= -9.6e+31)
                      		tmp = Float64(Float64(t * y) / Float64(a - z));
                      	elseif (y <= 1.42e+171)
                      		tmp = Float64(t + x);
                      	else
                      		tmp = Float64(Float64(x * y) / Float64(z - a));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a)
                      	tmp = 0.0;
                      	if (y <= -9.6e+31)
                      		tmp = (t * y) / (a - z);
                      	elseif (y <= 1.42e+171)
                      		tmp = t + x;
                      	else
                      		tmp = (x * y) / (z - a);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.6e+31], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e+171], N[(t + x), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      \mathbf{if}\;y \leq -9.6 \cdot 10^{+31}:\\
                      \;\;\;\;\frac{t \cdot y}{a - z}\\
                      
                      \mathbf{elif}\;y \leq 1.42 \cdot 10^{+171}:\\
                      \;\;\;\;t + x\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{x \cdot y}{z - a}\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if y < -9.5999999999999993e31

                        1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{t \cdot y}{a - z} \]
                          3. lower--.f6420.8%

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

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

                        if -9.5999999999999993e31 < y < 1.4199999999999999e171

                        1. Initial program 67.4%

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        3. Step-by-step derivation
                          1. lower--.f6419.6%

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        5. Taylor expanded in x around inf

                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                        6. Step-by-step derivation
                          1. lower-*.f642.8%

                            \[\leadsto x + -1 \cdot x \]
                        7. Applied rewrites2.8%

                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                        8. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{x + -1 \cdot x} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                          3. lower-+.f642.8%

                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                          4. lift-*.f64N/A

                            \[\leadsto -1 \cdot x + x \]
                          5. mul-1-negN/A

                            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                          6. lower-neg.f642.8%

                            \[\leadsto \left(-x\right) + x \]
                        9. Applied rewrites2.8%

                          \[\leadsto \color{blue}{\left(-x\right) + x} \]
                        10. Taylor expanded in x around 0

                          \[\leadsto t + x \]
                        11. Step-by-step derivation
                          1. Applied rewrites35.2%

                            \[\leadsto t + x \]

                          if 1.4199999999999999e171 < y

                          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\left(t - x\right) \cdot y\right) \cdot \color{blue}{\frac{-1}{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-/.f64N/A

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

                              \[\leadsto \frac{x \cdot y}{z - a} \]
                            3. lower--.f6420.6%

                              \[\leadsto \frac{x \cdot y}{z - a} \]
                          9. Applied rewrites20.6%

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

                        Alternative 12: 40.4% accurate, 1.0× speedup?

                        \[\begin{array}{l} t_1 := \frac{t \cdot y}{a - z}\\ \mathbf{if}\;y \leq -9.6 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+170}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                        (FPCore (x y z t a)
                          :precision binary64
                          (let* ((t_1 (/ (* t y) (- a z))))
                          (if (<= y -9.6e+31) t_1 (if (<= y 2.4e+170) (+ t x) t_1))))
                        double code(double x, double y, double z, double t, double a) {
                        	double t_1 = (t * y) / (a - z);
                        	double tmp;
                        	if (y <= -9.6e+31) {
                        		tmp = t_1;
                        	} else if (y <= 2.4e+170) {
                        		tmp = t + x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = (t * y) / (a - z)
                            if (y <= (-9.6d+31)) then
                                tmp = t_1
                            else if (y <= 2.4d+170) then
                                tmp = t + x
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	double t_1 = (t * y) / (a - z);
                        	double tmp;
                        	if (y <= -9.6e+31) {
                        		tmp = t_1;
                        	} else if (y <= 2.4e+170) {
                        		tmp = t + x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	t_1 = (t * y) / (a - z)
                        	tmp = 0
                        	if y <= -9.6e+31:
                        		tmp = t_1
                        	elif y <= 2.4e+170:
                        		tmp = t + x
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	t_1 = Float64(Float64(t * y) / Float64(a - z))
                        	tmp = 0.0
                        	if (y <= -9.6e+31)
                        		tmp = t_1;
                        	elseif (y <= 2.4e+170)
                        		tmp = Float64(t + x);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	t_1 = (t * y) / (a - z);
                        	tmp = 0.0;
                        	if (y <= -9.6e+31)
                        		tmp = t_1;
                        	elseif (y <= 2.4e+170)
                        		tmp = t + x;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.6e+31], t$95$1, If[LessEqual[y, 2.4e+170], N[(t + x), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        t_1 := \frac{t \cdot y}{a - z}\\
                        \mathbf{if}\;y \leq -9.6 \cdot 10^{+31}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;y \leq 2.4 \cdot 10^{+170}:\\
                        \;\;\;\;t + x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -9.5999999999999993e31 or 2.4e170 < y

                          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{t \cdot y}{a - z} \]
                            3. lower--.f6420.8%

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

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

                          if -9.5999999999999993e31 < y < 2.4e170

                          1. Initial program 67.4%

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          3. Step-by-step derivation
                            1. lower--.f6419.6%

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          5. Taylor expanded in x around inf

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          6. Step-by-step derivation
                            1. lower-*.f642.8%

                              \[\leadsto x + -1 \cdot x \]
                          7. Applied rewrites2.8%

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          8. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{x + -1 \cdot x} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            3. lower-+.f642.8%

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            4. lift-*.f64N/A

                              \[\leadsto -1 \cdot x + x \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                            6. lower-neg.f642.8%

                              \[\leadsto \left(-x\right) + x \]
                          9. Applied rewrites2.8%

                            \[\leadsto \color{blue}{\left(-x\right) + x} \]
                          10. Taylor expanded in x around 0

                            \[\leadsto t + x \]
                          11. Step-by-step derivation
                            1. Applied rewrites35.2%

                              \[\leadsto t + x \]
                          12. Recombined 2 regimes into one program.
                          13. Add Preprocessing

                          Alternative 13: 38.2% accurate, 1.6× speedup?

                          \[\begin{array}{l} \mathbf{if}\;a \leq -0.00039:\\ \;\;\;\;t + x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-133}:\\ \;\;\;\;t \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
                          (FPCore (x y z t a)
                            :precision binary64
                            (if (<= a -0.00039) (+ t x) (if (<= a 3.3e-133) (* t 1.0) (+ t x))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (a <= -0.00039) {
                          		tmp = t + x;
                          	} else if (a <= 3.3e-133) {
                          		tmp = t * 1.0;
                          	} else {
                          		tmp = t + x;
                          	}
                          	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 (a <= (-0.00039d0)) then
                                  tmp = t + x
                              else if (a <= 3.3d-133) then
                                  tmp = t * 1.0d0
                              else
                                  tmp = t + x
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (a <= -0.00039) {
                          		tmp = t + x;
                          	} else if (a <= 3.3e-133) {
                          		tmp = t * 1.0;
                          	} else {
                          		tmp = t + x;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if a <= -0.00039:
                          		tmp = t + x
                          	elif a <= 3.3e-133:
                          		tmp = t * 1.0
                          	else:
                          		tmp = t + x
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (a <= -0.00039)
                          		tmp = Float64(t + x);
                          	elseif (a <= 3.3e-133)
                          		tmp = Float64(t * 1.0);
                          	else
                          		tmp = Float64(t + x);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (a <= -0.00039)
                          		tmp = t + x;
                          	elseif (a <= 3.3e-133)
                          		tmp = t * 1.0;
                          	else
                          		tmp = t + x;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.00039], N[(t + x), $MachinePrecision], If[LessEqual[a, 3.3e-133], N[(t * 1.0), $MachinePrecision], N[(t + x), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          \mathbf{if}\;a \leq -0.00039:\\
                          \;\;\;\;t + x\\
                          
                          \mathbf{elif}\;a \leq 3.3 \cdot 10^{-133}:\\
                          \;\;\;\;t \cdot 1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t + x\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if a < -3.8999999999999999e-4 or 3.3000000000000001e-133 < a

                            1. Initial program 67.4%

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

                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                            3. Step-by-step derivation
                              1. lower--.f6419.6%

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

                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                            5. Taylor expanded in x around inf

                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                            6. Step-by-step derivation
                              1. lower-*.f642.8%

                                \[\leadsto x + -1 \cdot x \]
                            7. Applied rewrites2.8%

                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                            8. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{x + -1 \cdot x} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                              3. lower-+.f642.8%

                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                              4. lift-*.f64N/A

                                \[\leadsto -1 \cdot x + x \]
                              5. mul-1-negN/A

                                \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                              6. lower-neg.f642.8%

                                \[\leadsto \left(-x\right) + x \]
                            9. Applied rewrites2.8%

                              \[\leadsto \color{blue}{\left(-x\right) + x} \]
                            10. Taylor expanded in x around 0

                              \[\leadsto t + x \]
                            11. Step-by-step derivation
                              1. Applied rewrites35.2%

                                \[\leadsto t + x \]

                              if -3.8999999999999999e-4 < a < 3.3000000000000001e-133

                              1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

                                \[\leadsto t \cdot \left(\frac{y}{a - z} - -1\right) \]
                              6. Step-by-step derivation
                                1. Applied rewrites41.7%

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

                                  \[\leadsto t \cdot \left(\frac{y}{a} - -1\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites24.5%

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

                                    \[\leadsto t \cdot 1 \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites25.6%

                                      \[\leadsto t \cdot 1 \]
                                  4. Recombined 2 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 14: 35.2% accurate, 5.1× speedup?

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

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

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  3. Step-by-step derivation
                                    1. lower--.f6419.6%

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

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  5. Taylor expanded in x around inf

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  6. Step-by-step derivation
                                    1. lower-*.f642.8%

                                      \[\leadsto x + -1 \cdot x \]
                                  7. Applied rewrites2.8%

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  8. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    3. lower-+.f642.8%

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    4. lift-*.f64N/A

                                      \[\leadsto -1 \cdot x + x \]
                                    5. mul-1-negN/A

                                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                    6. lower-neg.f642.8%

                                      \[\leadsto \left(-x\right) + x \]
                                  9. Applied rewrites2.8%

                                    \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                  10. Taylor expanded in x around 0

                                    \[\leadsto t + x \]
                                  11. Step-by-step derivation
                                    1. Applied rewrites35.2%

                                      \[\leadsto t + x \]
                                    2. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025212 
                                    (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))))