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

Percentage Accurate: 96.8% → 96.8%
Time: 8.6s
Alternatives: 13
Speedup: 1.0×

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}

Sampling outcomes in binary64 precision:

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.8% 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: 96.8% 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}
Derivation
  1. Initial program 96.9%

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 74.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{-95}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 3900000000000:\\ \;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \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 -4.5e+24)
     t_1
     (if (<= t -2.35e-95)
       (- x a)
       (if (<= t 3900000000000.0) (- x (* (fma (- y) t y) 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 <= -4.5e+24) {
		tmp = t_1;
	} else if (t <= -2.35e-95) {
		tmp = x - a;
	} else if (t <= 3900000000000.0) {
		tmp = x - (fma(-y, t, y) * 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 <= -4.5e+24)
		tmp = t_1;
	elseif (t <= -2.35e-95)
		tmp = Float64(x - a);
	elseif (t <= 3900000000000.0)
		tmp = Float64(x - Float64(fma(Float64(-y), t, y) * 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, -4.5e+24], t$95$1, If[LessEqual[t, -2.35e-95], N[(x - a), $MachinePrecision], If[LessEqual[t, 3900000000000.0], N[(x - N[(N[((-y) * t + y), $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 -4.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.35 \cdot 10^{-95}:\\
\;\;\;\;x - a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.50000000000000019e24 or 3.9e12 < t

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.50000000000000019e24 < t < -2.3499999999999999e-95

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x - a} \]
      4. Step-by-step derivation
        1. lower--.f6466.3

          \[\leadsto \color{blue}{x - a} \]
      5. Applied rewrites66.3%

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

      if -2.3499999999999999e-95 < t < 3.9e12

      1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
        2. lower-+.f6468.4

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

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

        \[\leadsto x - \left(y + \color{blue}{-1 \cdot \left(t \cdot y\right)}\right) \cdot a \]
      12. Step-by-step derivation
        1. Applied rewrites68.2%

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

      Alternative 3: 91.9% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+25} \lor \neg \left(t \leq 7.6 \cdot 10^{+90}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (or (<= t -2.8e+25) (not (<= t 7.6e+90)))
         (fma (/ (- z y) t) a x)
         (- x (* a (/ (- y z) (- 1.0 z))))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((t <= -2.8e+25) || !(t <= 7.6e+90)) {
      		tmp = fma(((z - y) / t), a, x);
      	} else {
      		tmp = x - (a * ((y - z) / (1.0 - z)));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if ((t <= -2.8e+25) || !(t <= 7.6e+90))
      		tmp = fma(Float64(Float64(z - y) / t), a, x);
      	else
      		tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z))));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.8e+25], N[Not[LessEqual[t, 7.6e+90]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -2.8 \cdot 10^{+25} \lor \neg \left(t \leq 7.6 \cdot 10^{+90}\right):\\
      \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -2.8000000000000002e25 or 7.6000000000000002e90 < t

        1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z + -1 \cdot y}{t}, a, x\right) \]
        7. Step-by-step derivation
          1. Applied rewrites92.4%

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

          if -2.8000000000000002e25 < t < 7.6000000000000002e90

          1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

              \[\leadsto x - a \cdot \color{blue}{\frac{y - z}{1 - z}} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification93.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+25} \lor \neg \left(t \leq 7.6 \cdot 10^{+90}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 4: 91.2% accurate, 0.9× speedup?

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

            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

            if -6.1999999999999998e-15 < t < 7.6000000000000002e90

            1. Initial program 97.8%

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

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

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

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

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

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

                \[\leadsto x - \left(y - z\right) \cdot \color{blue}{\frac{a}{1 - z}} \]
              6. lower--.f6493.9

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

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

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

              if 7.6000000000000002e90 < t

              1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{z + -1 \cdot y}{t}, a, x\right) \]
              7. Step-by-step derivation
                1. Applied rewrites96.7%

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

              Alternative 5: 88.1% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+51} \lor \neg \left(z \leq 400\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (or (<= z -1.6e+51) (not (<= z 400.0)))
                 (fma (/ z (- (+ 1.0 t) z)) a x)
                 (- x (* (/ y (+ 1.0 t)) a))))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if ((z <= -1.6e+51) || !(z <= 400.0)) {
              		tmp = fma((z / ((1.0 + t) - z)), a, x);
              	} else {
              		tmp = x - ((y / (1.0 + t)) * a);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if ((z <= -1.6e+51) || !(z <= 400.0))
              		tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x);
              	else
              		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+51], N[Not[LessEqual[z, 400.0]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -1.6 \cdot 10^{+51} \lor \neg \left(z \leq 400\right):\\
              \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -1.6000000000000001e51 or 400 < z

                1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.6000000000000001e51 < z < 400

                1. Initial program 97.3%

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

                  \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                4. Step-by-step derivation
                  1. associate-/l*N/A

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

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

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

                    \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                  5. lower-+.f6492.0

                    \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                5. Applied rewrites92.0%

                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification90.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+51} \lor \neg \left(z \leq 400\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
              5. Add Preprocessing

              Alternative 6: 87.4% accurate, 1.0× speedup?

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

                1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

                  if -1.38000000000000006e51 < z < 400

                  1. Initial program 97.3%

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

                    \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                  4. Step-by-step derivation
                    1. associate-/l*N/A

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

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

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

                      \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                    5. lower-+.f6492.0

                      \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                  5. Applied rewrites92.0%

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

                  if 400 < z

                  1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                    10. lower-+.f6492.6

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

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

                Alternative 7: 84.5% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.66 \cdot 10^{+52} \lor \neg \left(z \leq 5.6 \cdot 10^{+58}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= z -1.66e+52) (not (<= z 5.6e+58)))
                   (- x a)
                   (- x (* (/ y (+ 1.0 t)) a))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((z <= -1.66e+52) || !(z <= 5.6e+58)) {
                		tmp = x - a;
                	} else {
                		tmp = x - ((y / (1.0 + t)) * 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 <= (-1.66d+52)) .or. (.not. (z <= 5.6d+58))) then
                        tmp = x - a
                    else
                        tmp = x - ((y / (1.0d0 + t)) * 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 <= -1.66e+52) || !(z <= 5.6e+58)) {
                		tmp = x - a;
                	} else {
                		tmp = x - ((y / (1.0 + t)) * a);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	tmp = 0
                	if (z <= -1.66e+52) or not (z <= 5.6e+58):
                		tmp = x - a
                	else:
                		tmp = x - ((y / (1.0 + t)) * a)
                	return tmp
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((z <= -1.66e+52) || !(z <= 5.6e+58))
                		tmp = Float64(x - a);
                	else
                		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	tmp = 0.0;
                	if ((z <= -1.66e+52) || ~((z <= 5.6e+58)))
                		tmp = x - a;
                	else
                		tmp = x - ((y / (1.0 + t)) * a);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.66e+52], N[Not[LessEqual[z, 5.6e+58]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -1.66 \cdot 10^{+52} \lor \neg \left(z \leq 5.6 \cdot 10^{+58}\right):\\
                \;\;\;\;x - a\\
                
                \mathbf{else}:\\
                \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -1.65999999999999994e52 or 5.5999999999999996e58 < z

                  1. Initial program 96.1%

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

                    \[\leadsto \color{blue}{x - a} \]
                  4. Step-by-step derivation
                    1. lower--.f6480.0

                      \[\leadsto \color{blue}{x - a} \]
                  5. Applied rewrites80.0%

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

                  if -1.65999999999999994e52 < z < 5.5999999999999996e58

                  1. Initial program 97.5%

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

                    \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                  4. Step-by-step derivation
                    1. associate-/l*N/A

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

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

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

                      \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                    5. lower-+.f6491.8

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

                    \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification87.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.66 \cdot 10^{+52} \lor \neg \left(z \leq 5.6 \cdot 10^{+58}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
                5. Add Preprocessing

                Alternative 8: 79.6% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+24} \lor \neg \left(t \leq 6.2 \cdot 10^{+20}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y}{1 - z}\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= t -4.3e+24) (not (<= t 6.2e+20)))
                   (fma (/ (- z y) t) a x)
                   (- x (* a (/ y (- 1.0 z))))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((t <= -4.3e+24) || !(t <= 6.2e+20)) {
                		tmp = fma(((z - y) / t), a, x);
                	} else {
                		tmp = x - (a * (y / (1.0 - z)));
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((t <= -4.3e+24) || !(t <= 6.2e+20))
                		tmp = fma(Float64(Float64(z - y) / t), a, x);
                	else
                		tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 - z))));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.3e+24], N[Not[LessEqual[t, 6.2e+20]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq -4.3 \cdot 10^{+24} \lor \neg \left(t \leq 6.2 \cdot 10^{+20}\right):\\
                \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;x - a \cdot \frac{y}{1 - z}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < -4.29999999999999987e24 or 6.2e20 < t

                  1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -4.29999999999999987e24 < t < 6.2e20

                    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x - a \cdot \color{blue}{\frac{y}{1 - z}} \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification81.0%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+24} \lor \neg \left(t \leq 6.2 \cdot 10^{+20}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y}{1 - z}\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 9: 72.1% accurate, 1.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \lor \neg \left(t \leq 0.75\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (or (<= t -1.0) (not (<= t 0.75)))
                         (fma (/ (- y) t) a x)
                         (- x (* (fma (- y) t y) a))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if ((t <= -1.0) || !(t <= 0.75)) {
                      		tmp = fma((-y / t), a, x);
                      	} else {
                      		tmp = x - (fma(-y, t, y) * a);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if ((t <= -1.0) || !(t <= 0.75))
                      		tmp = fma(Float64(Float64(-y) / t), a, x);
                      	else
                      		tmp = Float64(x - Float64(fma(Float64(-y), t, y) * a));
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.0], N[Not[LessEqual[t, 0.75]], $MachinePrecision]], N[(N[((-y) / t), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[((-y) * t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq -1 \lor \neg \left(t \leq 0.75\right):\\
                      \;\;\;\;\mathsf{fma}\left(\frac{-y}{t}, a, x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < -1 or 0.75 < t

                        1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot y}{t}, a, x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites79.6%

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

                          if -1 < t < 0.75

                          1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                            2. lower-+.f6467.0

                              \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                          10. Applied rewrites67.0%

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

                            \[\leadsto x - \left(y + \color{blue}{-1 \cdot \left(t \cdot y\right)}\right) \cdot a \]
                          12. Step-by-step derivation
                            1. Applied rewrites66.8%

                              \[\leadsto x - \mathsf{fma}\left(-y, \color{blue}{t}, y\right) \cdot a \]
                          13. Recombined 2 regimes into one program.
                          14. Final simplification74.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \lor \neg \left(t \leq 0.75\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\ \end{array} \]
                          15. Add Preprocessing

                          Alternative 10: 73.7% accurate, 1.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.45 \cdot 10^{-46} \lor \neg \left(z \leq 2.2 \cdot 10^{-6}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= z -3.45e-46) (not (<= z 2.2e-6)))
                             (- x a)
                             (- x (* (- y z) (fma a z a)))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((z <= -3.45e-46) || !(z <= 2.2e-6)) {
                          		tmp = x - a;
                          	} else {
                          		tmp = x - ((y - z) * fma(a, z, a));
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((z <= -3.45e-46) || !(z <= 2.2e-6))
                          		tmp = Float64(x - a);
                          	else
                          		tmp = Float64(x - Float64(Float64(y - z) * fma(a, z, a)));
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.45e-46], N[Not[LessEqual[z, 2.2e-6]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a * z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -3.45 \cdot 10^{-46} \lor \neg \left(z \leq 2.2 \cdot 10^{-6}\right):\\
                          \;\;\;\;x - a\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -3.4499999999999999e-46 or 2.2000000000000001e-6 < z

                            1. Initial program 96.3%

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

                              \[\leadsto \color{blue}{x - a} \]
                            4. Step-by-step derivation
                              1. lower--.f6473.4

                                \[\leadsto \color{blue}{x - a} \]
                            5. Applied rewrites73.4%

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

                            if -3.4499999999999999e-46 < z < 2.2000000000000001e-6

                            1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \left(y - z\right) \cdot \mathsf{fma}\left(a, \color{blue}{z}, a\right) \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification70.6%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.45 \cdot 10^{-46} \lor \neg \left(z \leq 2.2 \cdot 10^{-6}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 11: 72.5% accurate, 1.7× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{-13} \lor \neg \left(z \leq 3.4 \cdot 10^{+58}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot y\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (if (or (<= z -7.3e-13) (not (<= z 3.4e+58))) (- x a) (- x (* a y))))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if ((z <= -7.3e-13) || !(z <= 3.4e+58)) {
                            		tmp = x - a;
                            	} else {
                            		tmp = x - (a * y);
                            	}
                            	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 <= (-7.3d-13)) .or. (.not. (z <= 3.4d+58))) then
                                    tmp = x - a
                                else
                                    tmp = x - (a * y)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if ((z <= -7.3e-13) || !(z <= 3.4e+58)) {
                            		tmp = x - a;
                            	} else {
                            		tmp = x - (a * y);
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	tmp = 0
                            	if (z <= -7.3e-13) or not (z <= 3.4e+58):
                            		tmp = x - a
                            	else:
                            		tmp = x - (a * y)
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if ((z <= -7.3e-13) || !(z <= 3.4e+58))
                            		tmp = Float64(x - a);
                            	else
                            		tmp = Float64(x - Float64(a * y));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	tmp = 0.0;
                            	if ((z <= -7.3e-13) || ~((z <= 3.4e+58)))
                            		tmp = x - a;
                            	else
                            		tmp = x - (a * y);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.3e-13], N[Not[LessEqual[z, 3.4e+58]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;z \leq -7.3 \cdot 10^{-13} \lor \neg \left(z \leq 3.4 \cdot 10^{+58}\right):\\
                            \;\;\;\;x - a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x - a \cdot y\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -7.3000000000000002e-13 or 3.4000000000000001e58 < z

                              1. Initial program 95.8%

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

                                \[\leadsto \color{blue}{x - a} \]
                              4. Step-by-step derivation
                                1. lower--.f6476.4

                                  \[\leadsto \color{blue}{x - a} \]
                              5. Applied rewrites76.4%

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

                              if -7.3000000000000002e-13 < z < 3.4000000000000001e58

                              1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto x - a \cdot \color{blue}{y} \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification69.7%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{-13} \lor \neg \left(z \leq 3.4 \cdot 10^{+58}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot y\\ \end{array} \]
                                6. Add Preprocessing

                                Alternative 12: 60.0% accurate, 8.8× 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. Add Preprocessing
                                3. Taylor expanded in z around inf

                                  \[\leadsto \color{blue}{x - a} \]
                                4. Step-by-step derivation
                                  1. lower--.f6456.0

                                    \[\leadsto \color{blue}{x - a} \]
                                5. Applied rewrites56.0%

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

                                Alternative 13: 16.5% accurate, 11.7× speedup?

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

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

                                  \[\leadsto \color{blue}{x - a} \]
                                4. Step-by-step derivation
                                  1. lower--.f6456.0

                                    \[\leadsto \color{blue}{x - a} \]
                                5. Applied rewrites56.0%

                                  \[\leadsto \color{blue}{x - a} \]
                                6. Taylor expanded in x around 0

                                  \[\leadsto -1 \cdot \color{blue}{a} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites15.9%

                                    \[\leadsto -a \]
                                  2. Add Preprocessing

                                  Developer Target 1: 99.6% accurate, 1.2× speedup?

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

                                  Reproduce

                                  ?
                                  herbie shell --seed 2024352 
                                  (FPCore (x y z t a)
                                    :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                    :precision binary64
                                  
                                    :alt
                                    (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
                                  
                                    (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))