Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 96.9% → 99.8%
Time: 10.4s
Alternatives: 15
Speedup: 1.1×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
    18. metadata-eval99.8

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

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

Alternative 2: 96.9% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e132 < z

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
      18. metadata-eval99.8

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

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

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

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

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

Alternative 3: 92.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+34}:\\
\;\;\;\;x - \frac{y - z}{\frac{t + 1}{a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.9999999999999999e23 or 3.70000000000000009e34 < z

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
      18. metadata-eval99.8

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

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

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

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

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

    if -4.9999999999999999e23 < z < 3.70000000000000009e34

    1. Initial program 96.9%

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

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

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

    Alternative 4: 88.5% accurate, 0.8× speedup?

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

      1. Initial program 96.9%

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

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

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

          \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
        3. lower-+.f6469.7

          \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
      4. Applied rewrites69.7%

        \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
      5. Taylor expanded in t around inf

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

          \[\leadsto x - \frac{a \cdot y}{t} \]
        2. lower-*.f6454.6

          \[\leadsto x - \frac{a \cdot y}{t} \]
      7. Applied rewrites54.6%

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

          \[\leadsto x - \frac{a \cdot y}{t} \]
        2. frac-2negN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
        12. lower-/.f6456.7

          \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
      9. Applied rewrites56.7%

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

      if -7e21 < t < 0.00440000000000000027

      1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
        18. metadata-eval99.8

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

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

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

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

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

      if 0.00440000000000000027 < t

      1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
        18. metadata-eval99.8

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

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

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

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

      Alternative 5: 88.1% accurate, 0.8× speedup?

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

        1. Initial program 96.9%

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

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

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

            \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
          3. lower-+.f6469.7

            \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
        4. Applied rewrites69.7%

          \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
        5. Taylor expanded in t around inf

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

            \[\leadsto x - \frac{a \cdot y}{t} \]
          2. lower-*.f6454.6

            \[\leadsto x - \frac{a \cdot y}{t} \]
        7. Applied rewrites54.6%

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

            \[\leadsto x - \frac{a \cdot y}{t} \]
          2. frac-2negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
          12. lower-/.f6456.7

            \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
        9. Applied rewrites56.7%

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

        if -7e21 < t < 2.6999999999999999e-5

        1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
          18. metadata-eval99.8

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{z - y}{1 - z}} \cdot a + x \]
          5. mult-flipN/A

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

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

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

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

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

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

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

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

        if 2.6999999999999999e-5 < t

        1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
          18. metadata-eval99.8

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

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

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

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

        Alternative 6: 86.9% accurate, 0.8× speedup?

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

          1. Initial program 96.9%

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

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

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

              \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
            3. lower-+.f6469.7

              \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
          4. Applied rewrites69.7%

            \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
          5. Taylor expanded in t around inf

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

              \[\leadsto x - \frac{a \cdot y}{t} \]
            2. lower-*.f6454.6

              \[\leadsto x - \frac{a \cdot y}{t} \]
          7. Applied rewrites54.6%

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

              \[\leadsto x - \frac{a \cdot y}{t} \]
            2. frac-2negN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
            12. lower-/.f6456.7

              \[\leadsto x - \left(-a\right) \cdot \left(y \cdot \frac{-1}{t}\right) \]
          9. Applied rewrites56.7%

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

          if -7e21 < t < 1.46e16

          1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
            18. metadata-eval99.8

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{z - y}{1 - z}} \cdot a + x \]
            5. mult-flipN/A

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

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

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

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

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

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

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

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

          if 1.46e16 < t

          1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
            18. metadata-eval99.8

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

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

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

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

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

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

        Alternative 7: 84.3% accurate, 0.9× speedup?

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

          1. Initial program 96.9%

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

            \[\leadsto x - \color{blue}{a} \]
          3. Step-by-step derivation
            1. Applied rewrites59.3%

              \[\leadsto x - \color{blue}{a} \]

            if -1.1999999999999999e77 < z < 1.35000000000000001e35

            1. Initial program 96.9%

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

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

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

                \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
              3. lower-+.f6469.7

                \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
            4. Applied rewrites69.7%

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

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

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

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

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

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

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

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

                \[\leadsto x - \frac{a}{1 + t} \cdot y \]
              9. lower-/.f6472.6

                \[\leadsto x - \frac{a}{1 + t} \cdot y \]
              10. lift-+.f64N/A

                \[\leadsto x - \frac{a}{1 + t} \cdot y \]
              11. +-commutativeN/A

                \[\leadsto x - \frac{a}{t + 1} \cdot y \]
              12. add-flipN/A

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

                \[\leadsto x - \frac{a}{t - -1} \cdot y \]
              14. lower--.f6472.6

                \[\leadsto x - \frac{a}{t - -1} \cdot y \]
            6. Applied rewrites72.6%

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

            if 1.35000000000000001e35 < z

            1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
              18. metadata-eval99.8

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

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

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

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

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

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

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

            Alternative 8: 73.6% accurate, 0.8× speedup?

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

              1. Initial program 96.9%

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

                \[\leadsto x - \color{blue}{a} \]
              3. Step-by-step derivation
                1. Applied rewrites59.3%

                  \[\leadsto x - \color{blue}{a} \]

                if -4.9999999999999999e23 < z < 4.59999999999999978e-281

                1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
                  18. metadata-eval99.8

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

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

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

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

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

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

                if 4.59999999999999978e-281 < z < 2.39999999999999998e82

                1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x - \frac{a \cdot y}{1 - z} \]
                7. Applied rewrites63.6%

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

              Alternative 9: 71.9% accurate, 0.8× speedup?

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

                1. Initial program 96.9%

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

                  \[\leadsto x - \color{blue}{a} \]
                3. Step-by-step derivation
                  1. Applied rewrites59.3%

                    \[\leadsto x - \color{blue}{a} \]

                  if -4.9999999999999999e23 < z < 4.59999999999999978e-281

                  1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
                    18. metadata-eval99.8

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

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

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

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

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

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

                  if 4.59999999999999978e-281 < z < 2.39999999999999998e82

                  1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x - \frac{a \cdot y}{1 - z} \]
                  7. Applied rewrites63.6%

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

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

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

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

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

                      \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                    6. lower-/.f6465.4

                      \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                  9. Applied rewrites65.4%

                    \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 10: 71.8% accurate, 0.9× speedup?

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

                  1. Initial program 96.9%

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

                    \[\leadsto x - \color{blue}{a} \]
                  3. Step-by-step derivation
                    1. Applied rewrites59.3%

                      \[\leadsto x - \color{blue}{a} \]

                    if -4.9999999999999999e23 < z < 4.59999999999999978e-281

                    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
                      18. metadata-eval99.8

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

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

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

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

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

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

                    if 4.59999999999999978e-281 < z < 3.04999999999999998e34

                    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x - \frac{a \cdot y}{1 - z} \]
                    7. Applied rewrites63.6%

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

                      \[\leadsto x - \frac{a \cdot y}{1} \]
                    9. Step-by-step derivation
                      1. Applied rewrites57.3%

                        \[\leadsto x - \frac{a \cdot y}{1} \]
                    10. Recombined 3 regimes into one program.
                    11. Add Preprocessing

                    Alternative 11: 71.1% accurate, 0.9× speedup?

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

                      1. Initial program 96.9%

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

                        \[\leadsto x - \color{blue}{a} \]
                      3. Step-by-step derivation
                        1. Applied rewrites59.3%

                          \[\leadsto x - \color{blue}{a} \]

                        if -2.90000000000000007e38 < z < 4.59999999999999978e-281

                        1. Initial program 96.9%

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

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

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

                            \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                          3. lower-+.f6469.7

                            \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
                        4. Applied rewrites69.7%

                          \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                        5. Taylor expanded in t around inf

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

                            \[\leadsto x - \frac{a \cdot y}{t} \]
                          2. lower-*.f6454.6

                            \[\leadsto x - \frac{a \cdot y}{t} \]
                        7. Applied rewrites54.6%

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

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

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

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

                            \[\leadsto x - \frac{y}{t} \cdot a \]
                          5. lower-*.f64N/A

                            \[\leadsto x - \frac{y}{t} \cdot a \]
                          6. lower-/.f6456.7

                            \[\leadsto x - \frac{y}{t} \cdot a \]
                        9. Applied rewrites56.7%

                          \[\leadsto x - \frac{y}{t} \cdot a \]

                        if 4.59999999999999978e-281 < z < 3.04999999999999998e34

                        1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x - \frac{a \cdot y}{1 - z} \]
                        7. Applied rewrites63.6%

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

                          \[\leadsto x - \frac{a \cdot y}{1} \]
                        9. Step-by-step derivation
                          1. Applied rewrites57.3%

                            \[\leadsto x - \frac{a \cdot y}{1} \]
                        10. Recombined 3 regimes into one program.
                        11. Add Preprocessing

                        Alternative 12: 70.8% accurate, 0.9× speedup?

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

                          1. Initial program 96.9%

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

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

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

                              \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                            3. lower-+.f6469.7

                              \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
                          4. Applied rewrites69.7%

                            \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                          5. Taylor expanded in t around inf

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

                              \[\leadsto x - \frac{a \cdot y}{t} \]
                            2. lower-*.f6454.6

                              \[\leadsto x - \frac{a \cdot y}{t} \]
                          7. Applied rewrites54.6%

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

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

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

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

                              \[\leadsto x - \frac{y}{t} \cdot a \]
                            5. lower-*.f64N/A

                              \[\leadsto x - \frac{y}{t} \cdot a \]
                            6. lower-/.f6456.7

                              \[\leadsto x - \frac{y}{t} \cdot a \]
                          9. Applied rewrites56.7%

                            \[\leadsto x - \frac{y}{t} \cdot a \]

                          if -4.1e21 < t < 1.6200000000000001e136

                          1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
                            18. metadata-eval99.8

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

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

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

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

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

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

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

                            if 1.6200000000000001e136 < t

                            1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{\left(t - z\right) - \left(\mathsf{neg}\left(1\right)\right)}}, a, x\right) \]
                              18. metadata-eval99.8

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

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

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

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

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

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

                          Alternative 13: 70.8% accurate, 1.0× speedup?

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

                            1. Initial program 96.9%

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

                              \[\leadsto x - \color{blue}{a} \]
                            3. Step-by-step derivation
                              1. Applied rewrites59.3%

                                \[\leadsto x - \color{blue}{a} \]

                              if -2.90000000000000007e38 < z < 7.6000000000000003e34

                              1. Initial program 96.9%

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

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

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

                                  \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                                3. lower-+.f6469.7

                                  \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
                              4. Applied rewrites69.7%

                                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                              5. Taylor expanded in t around inf

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

                                  \[\leadsto x - \frac{a \cdot y}{t} \]
                                2. lower-*.f6454.6

                                  \[\leadsto x - \frac{a \cdot y}{t} \]
                              7. Applied rewrites54.6%

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

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

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

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

                                  \[\leadsto x - \frac{y}{t} \cdot a \]
                                5. lower-*.f64N/A

                                  \[\leadsto x - \frac{y}{t} \cdot a \]
                                6. lower-/.f6456.7

                                  \[\leadsto x - \frac{y}{t} \cdot a \]
                              9. Applied rewrites56.7%

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

                            Alternative 14: 69.1% accurate, 1.0× speedup?

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

                              1. Initial program 96.9%

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

                                \[\leadsto x - \color{blue}{a} \]
                              3. Step-by-step derivation
                                1. Applied rewrites59.3%

                                  \[\leadsto x - \color{blue}{a} \]

                                if -2.30000000000000002e37 < z < 5.00000000000000018e-98

                                1. Initial program 96.9%

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

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

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

                                    \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                                  3. lower-+.f6469.7

                                    \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
                                4. Applied rewrites69.7%

                                  \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                                5. Taylor expanded in t around inf

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

                                    \[\leadsto x - \frac{a \cdot y}{t} \]
                                  2. lower-*.f6454.6

                                    \[\leadsto x - \frac{a \cdot y}{t} \]
                                7. Applied rewrites54.6%

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

                                    \[\leadsto x - \frac{a \cdot y}{t} \]
                                  2. mult-flipN/A

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

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

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

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

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

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

                                    \[\leadsto x - \frac{a}{t} \cdot y \]
                                  9. lower-/.f6456.4

                                    \[\leadsto x - \frac{a}{t} \cdot y \]
                                9. Applied rewrites56.4%

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

                              Alternative 15: 59.3% accurate, 5.1× speedup?

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

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

                                \[\leadsto x - \color{blue}{a} \]
                              3. Step-by-step derivation
                                1. Applied rewrites59.3%

                                  \[\leadsto x - \color{blue}{a} \]
                                2. Add Preprocessing

                                Reproduce

                                ?
                                herbie shell --seed 2025143 
                                (FPCore (x y z t a)
                                  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                  :precision binary64
                                  (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))