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

Percentage Accurate: 96.9% → 99.7%
Time: 7.0s
Alternatives: 13
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 13 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.7% 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.7

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

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

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

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

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

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

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

    Alternative 2: 97.6% accurate, 0.9× speedup?

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

      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.7

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

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

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

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

        if -6.99999999999999999e197 < 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. 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)} \]
      6. Recombined 2 regimes into one program.
      7. Add Preprocessing

      Alternative 3: 91.9% accurate, 0.8× speedup?

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

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

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

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

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

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

        if -4.2e38 < t < 2.64999999999999993e57

        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.7

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

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

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

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

          \[\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 4: 88.5% accurate, 0.8× speedup?

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

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

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

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

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

          if -1.80000000000000005e-5 < z < 6.8e10

          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.8

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

            \[\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-/.f6471.8

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

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

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

        Alternative 5: 85.6% accurate, 0.8× speedup?

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

          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 rewrites60.5%

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

            if -3.5000000000000001e78 < z < 6.8e10

            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.8

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

              \[\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-/.f6471.8

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

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

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

            if 6.8e10 < 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.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 84.0% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+78}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+90}:\\ \;\;\;\;x - \frac{a}{t - -1} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (if (<= z -3.5e+78)
               (- x a)
               (if (<= z 1.12e+90) (- x (* (/ a (- t -1.0)) y)) (- x a))))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (z <= -3.5e+78) {
            		tmp = x - a;
            	} else if (z <= 1.12e+90) {
            		tmp = x - ((a / (t - -1.0)) * 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 <= (-3.5d+78)) then
                    tmp = x - a
                else if (z <= 1.12d+90) then
                    tmp = x - ((a / (t - (-1.0d0))) * 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 <= -3.5e+78) {
            		tmp = x - a;
            	} else if (z <= 1.12e+90) {
            		tmp = x - ((a / (t - -1.0)) * y);
            	} else {
            		tmp = x - a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	tmp = 0
            	if z <= -3.5e+78:
            		tmp = x - a
            	elif z <= 1.12e+90:
            		tmp = x - ((a / (t - -1.0)) * y)
            	else:
            		tmp = x - a
            	return tmp
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if (z <= -3.5e+78)
            		tmp = Float64(x - a);
            	elseif (z <= 1.12e+90)
            		tmp = Float64(x - Float64(Float64(a / Float64(t - -1.0)) * y));
            	else
            		tmp = Float64(x - a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	tmp = 0.0;
            	if (z <= -3.5e+78)
            		tmp = x - a;
            	elseif (z <= 1.12e+90)
            		tmp = x - ((a / (t - -1.0)) * y);
            	else
            		tmp = x - a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+78], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.12e+90], N[(x - N[(N[(a / N[(t - -1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -3.5 \cdot 10^{+78}:\\
            \;\;\;\;x - a\\
            
            \mathbf{elif}\;z \leq 1.12 \cdot 10^{+90}:\\
            \;\;\;\;x - \frac{a}{t - -1} \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;x - a\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -3.5000000000000001e78 or 1.1199999999999999e90 < 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 rewrites60.5%

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

                if -3.5000000000000001e78 < z < 1.1199999999999999e90

                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.8

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

                  \[\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-/.f6471.8

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

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

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

              Alternative 7: 79.3% accurate, 0.8× speedup?

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

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

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

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

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

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

                if -9.79999999999999969e30 < t < -1.8000000000000001e-70

                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.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.8000000000000001e-70 < t < 2.24999999999999998e57

                  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--.f6471.2

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

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

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

                    \[\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 - z} \]
                    2. lift-/.f64N/A

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

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

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

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

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

                      \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                    8. lift--.f6465.7

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

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

                Alternative 8: 75.2% accurate, 0.8× speedup?

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

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

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

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

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

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

                  if -9.79999999999999969e30 < t < 1.32e-197

                  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.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.32e-197 < t < 3e21

                    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--.f6471.2

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

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

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

                      \[\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 - z} \]
                      2. lift-/.f64N/A

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

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

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

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

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

                        \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                      8. lift--.f6465.7

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

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

                      \[\leadsto x - a \cdot \color{blue}{y} \]
                    11. Step-by-step derivation
                      1. lower-*.f6458.2

                        \[\leadsto x - a \cdot y \]
                    12. Applied rewrites58.2%

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

                  Alternative 9: 73.4% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-20}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-257}:\\ \;\;\;\;x - \frac{y}{t} \cdot a\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-5}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= z -2.2e-20)
                     (- x a)
                     (if (<= z -1.45e-257)
                       (- x (* (/ y t) a))
                       (if (<= z 1.52e-5) (- x (* a y)) (- x a)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (z <= -2.2e-20) {
                  		tmp = x - a;
                  	} else if (z <= -1.45e-257) {
                  		tmp = x - ((y / t) * a);
                  	} else if (z <= 1.52e-5) {
                  		tmp = x - (a * 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.2d-20)) then
                          tmp = x - a
                      else if (z <= (-1.45d-257)) then
                          tmp = x - ((y / t) * a)
                      else if (z <= 1.52d-5) then
                          tmp = x - (a * 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.2e-20) {
                  		tmp = x - a;
                  	} else if (z <= -1.45e-257) {
                  		tmp = x - ((y / t) * a);
                  	} else if (z <= 1.52e-5) {
                  		tmp = x - (a * y);
                  	} else {
                  		tmp = x - a;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if z <= -2.2e-20:
                  		tmp = x - a
                  	elif z <= -1.45e-257:
                  		tmp = x - ((y / t) * a)
                  	elif z <= 1.52e-5:
                  		tmp = x - (a * y)
                  	else:
                  		tmp = x - a
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (z <= -2.2e-20)
                  		tmp = Float64(x - a);
                  	elseif (z <= -1.45e-257)
                  		tmp = Float64(x - Float64(Float64(y / t) * a));
                  	elseif (z <= 1.52e-5)
                  		tmp = Float64(x - Float64(a * 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.2e-20)
                  		tmp = x - a;
                  	elseif (z <= -1.45e-257)
                  		tmp = x - ((y / t) * a);
                  	elseif (z <= 1.52e-5)
                  		tmp = x - (a * y);
                  	else
                  		tmp = x - a;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e-20], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.45e-257], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-5], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -2.2 \cdot 10^{-20}:\\
                  \;\;\;\;x - a\\
                  
                  \mathbf{elif}\;z \leq -1.45 \cdot 10^{-257}:\\
                  \;\;\;\;x - \frac{y}{t} \cdot a\\
                  
                  \mathbf{elif}\;z \leq 1.52 \cdot 10^{-5}:\\
                  \;\;\;\;x - a \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x - a\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -2.19999999999999991e-20 or 1.52e-5 < 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 rewrites60.5%

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

                      if -2.19999999999999991e-20 < z < -1.4500000000000001e-257

                      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.8

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

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

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

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

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

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

                      if -1.4500000000000001e-257 < z < 1.52e-5

                      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--.f6471.2

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

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

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

                        \[\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 - z} \]
                        2. lift-/.f64N/A

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

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

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

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

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

                          \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                        8. lift--.f6465.7

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

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

                        \[\leadsto x - a \cdot \color{blue}{y} \]
                      11. Step-by-step derivation
                        1. lower-*.f6458.2

                          \[\leadsto x - a \cdot y \]
                      12. Applied rewrites58.2%

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

                    Alternative 10: 72.5% accurate, 1.0× speedup?

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

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

                        if -9.9999999999999995e59 < z < -1.4500000000000001e-257

                        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.8

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

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

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

                          \[\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. lower-*.f64N/A

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

                            \[\leadsto x - y \cdot \frac{a}{t} \]
                          8. lower-/.f6455.5

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

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

                        if -1.4500000000000001e-257 < z < 1.52e-5

                        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--.f6471.2

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

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

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

                          \[\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 - z} \]
                          2. lift-/.f64N/A

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

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

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

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

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

                            \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                          8. lift--.f6465.7

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

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

                          \[\leadsto x - a \cdot \color{blue}{y} \]
                        11. Step-by-step derivation
                          1. lower-*.f6458.2

                            \[\leadsto x - a \cdot y \]
                        12. Applied rewrites58.2%

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

                      Alternative 11: 72.3% accurate, 0.9× speedup?

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

                        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.8

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

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

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

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

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

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

                        if -9.5000000000000003e30 < t < 3.50000000000000013e-77

                        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.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 12: 71.4% accurate, 1.3× speedup?

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

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

                            if -3.8000000000000001e77 < z < 1.52e-5

                            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--.f6471.2

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

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

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

                              \[\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 - z} \]
                              2. lift-/.f64N/A

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

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

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

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

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

                                \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                              8. lift--.f6465.7

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

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

                              \[\leadsto x - a \cdot \color{blue}{y} \]
                            11. Step-by-step derivation
                              1. lower-*.f6458.2

                                \[\leadsto x - a \cdot y \]
                            12. Applied rewrites58.2%

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

                          Alternative 13: 60.5% 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 rewrites60.5%

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

                            Reproduce

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