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

Percentage Accurate: 97.2% → 99.6%
Time: 4.9s
Alternatives: 12
Speedup: 1.3×

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 12 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: 97.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.6% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 57.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+125} \lor \neg \left(t\_1 \leq 10^{+76}\right):\\ \;\;\;\;-a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a))))
   (if (or (<= t_1 -1e+125) (not (<= t_1 1e+76))) (- a) x)))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (((t - z) + 1.0) / a);
	double tmp;
	if ((t_1 <= -1e+125) || !(t_1 <= 1e+76)) {
		tmp = -a;
	} else {
		tmp = x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) / (((t - z) + 1.0d0) / a)
    if ((t_1 <= (-1d+125)) .or. (.not. (t_1 <= 1d+76))) then
        tmp = -a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (((t - z) + 1.0) / a);
	double tmp;
	if ((t_1 <= -1e+125) || !(t_1 <= 1e+76)) {
		tmp = -a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) / (((t - z) + 1.0) / a)
	tmp = 0
	if (t_1 <= -1e+125) or not (t_1 <= 1e+76):
		tmp = -a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
	tmp = 0.0
	if ((t_1 <= -1e+125) || !(t_1 <= 1e+76))
		tmp = Float64(-a);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) / (((t - z) + 1.0) / a);
	tmp = 0.0;
	if ((t_1 <= -1e+125) || ~((t_1 <= 1e+76)))
		tmp = -a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+125], N[Not[LessEqual[t$95$1, 1e+76]], $MachinePrecision]], (-a), x]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+125} \lor \neg \left(t\_1 \leq 10^{+76}\right):\\
\;\;\;\;-a\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -9.9999999999999992e124 or 1e76 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{a} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a\right) \]
      2. lift-neg.f6429.4

        \[\leadsto -a \]
    11. Applied rewrites29.4%

      \[\leadsto -a \]

    if -9.9999999999999992e124 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1e76

    1. Initial program 98.7%

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

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Applied rewrites66.5%

        \[\leadsto \color{blue}{x} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification54.2%

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

    Alternative 3: 71.2% accurate, 0.7× speedup?

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

      1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z - y}{-1 \cdot z}, a, x\right) \]
        3. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\frac{z - y}{\mathsf{neg}\left(z\right)}, a, x\right) \]
          2. lower-neg.f6483.5

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

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

        if -1.32999999999999992e-69 < z < 5.39999999999999975e-174

        1. Initial program 99.9%

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

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

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

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

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

            \[\leadsto x - \frac{\left(y - z\right) \cdot a}{t} \]
        5. Applied rewrites69.4%

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

          \[\leadsto x - \frac{y \cdot a}{t} \]
        7. Step-by-step derivation
          1. Applied rewrites70.7%

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

          if 5.39999999999999975e-174 < z < 5.7999999999999996e-65

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(z - y\right) \cdot a}{1 - z} \]
          10. Step-by-step derivation
            1. Applied rewrites71.4%

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

            if 5.7999999999999996e-65 < z < 2e3

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{z - y}{t}, a, x\right) \]
          11. Recombined 4 regimes into one program.
          12. Final simplification79.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.33 \cdot 10^{-69}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{-z}, a, x\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-174}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-65}:\\ \;\;\;\;\frac{\left(z - y\right) \cdot a}{1 - z}\\ \mathbf{elif}\;z \leq 2000:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{-z}, a, x\right)\\ \end{array} \]
          13. Add Preprocessing

          Alternative 4: 68.4% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-99}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-278}:\\ \;\;\;\;\frac{\left(z - y\right) \cdot a}{1 - z}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+25}:\\ \;\;\;\;x - 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.6e+43)
               t_1
               (if (<= t -2.3e-99)
                 (- x a)
                 (if (<= t 4.8e-278)
                   (/ (* (- z y) a) (- 1.0 z))
                   (if (<= t 7.8e+25) (- x 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.6e+43) {
          		tmp = t_1;
          	} else if (t <= -2.3e-99) {
          		tmp = x - a;
          	} else if (t <= 4.8e-278) {
          		tmp = ((z - y) * a) / (1.0 - z);
          	} else if (t <= 7.8e+25) {
          		tmp = x - 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.6e+43)
          		tmp = t_1;
          	elseif (t <= -2.3e-99)
          		tmp = Float64(x - a);
          	elseif (t <= 4.8e-278)
          		tmp = Float64(Float64(Float64(z - y) * a) / Float64(1.0 - z));
          	elseif (t <= 7.8e+25)
          		tmp = Float64(x - 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.6e+43], t$95$1, If[LessEqual[t, -2.3e-99], N[(x - a), $MachinePrecision], If[LessEqual[t, 4.8e-278], N[(N[(N[(z - y), $MachinePrecision] * a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+25], N[(x - a), $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.6 \cdot 10^{+43}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq -2.3 \cdot 10^{-99}:\\
          \;\;\;\;x - a\\
          
          \mathbf{elif}\;t \leq 4.8 \cdot 10^{-278}:\\
          \;\;\;\;\frac{\left(z - y\right) \cdot a}{1 - z}\\
          
          \mathbf{elif}\;t \leq 7.8 \cdot 10^{+25}:\\
          \;\;\;\;x - a\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if t < -4.6000000000000005e43 or 7.8000000000000004e25 < t

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.6000000000000005e43 < t < -2.2999999999999998e-99 or 4.8e-278 < t < 7.8000000000000004e25

            1. Initial program 98.9%

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

              \[\leadsto x - \color{blue}{a} \]
            4. Step-by-step derivation
              1. Applied rewrites66.9%

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

              if -2.2999999999999998e-99 < t < 4.8e-278

              1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\left(z - y\right) \cdot a}{\left(1 + t\right) - \color{blue}{z}} \]
                8. lift-+.f6461.4

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

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

                \[\leadsto \frac{\left(z - y\right) \cdot a}{1 - z} \]
              10. Step-by-step derivation
                1. Applied rewrites61.4%

                  \[\leadsto \frac{\left(z - y\right) \cdot a}{1 - z} \]
              11. Recombined 3 regimes into one program.
              12. Add Preprocessing

              Alternative 5: 98.7% accurate, 1.0× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -4.3e5 < t < 1.94999999999999999e-28

                  1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{z - y}{1 - z}, a, x\right) \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification98.9%

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

                  Alternative 6: 90.6% accurate, 1.0× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.25e136 < t < 3.50000000000000023e45

                    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{z - y}{1 - z}, a, x\right) \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification94.8%

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

                    Alternative 7: 87.0% accurate, 1.0× speedup?

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

                      1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{z - y}{-1 \cdot z}, a, x\right) \]
                        3. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \mathsf{fma}\left(\frac{z - y}{\mathsf{neg}\left(z\right)}, a, x\right) \]
                          2. lower-neg.f6487.1

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

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

                        if -0.0057000000000000002 < z < 196

                        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 x - \color{blue}{a} \]
                        4. Step-by-step derivation
                          1. Applied rewrites38.4%

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

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

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

                              \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                            3. lift-+.f6490.6

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

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

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

                        Alternative 8: 88.9% accurate, 1.0× speedup?

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

                          1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{z - y}{-1 \cdot z}, a, x\right) \]
                            3. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{\mathsf{neg}\left(z\right)}, a, x\right) \]
                              2. lower-neg.f6488.0

                                \[\leadsto \mathsf{fma}\left(\frac{z - y}{-z}, a, x\right) \]
                            4. Applied rewrites88.0%

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

                            if -8e17 < z < 225

                            1. Initial program 99.8%

                              \[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 - a \cdot \color{blue}{\frac{y}{1 + t}} \]
                              2. lower-*.f64N/A

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

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

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

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

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

                          Alternative 9: 72.1% accurate, 1.1× speedup?

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

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -4.6000000000000005e43 < t < 7.8000000000000004e25

                            1. Initial program 98.6%

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

                              \[\leadsto x - \color{blue}{a} \]
                            4. Step-by-step derivation
                              1. Applied rewrites57.7%

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

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

                            Alternative 10: 69.5% accurate, 1.1× speedup?

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

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot y}{t}, a, x\right) \]
                              10. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(y\right)}{t}, a, x\right) \]
                                2. lower-neg.f6479.9

                                  \[\leadsto \mathsf{fma}\left(\frac{-y}{t}, a, x\right) \]
                              11. Applied rewrites79.9%

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

                              if -4.1e43 < t < 1.36e29

                              1. Initial program 98.6%

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

                                \[\leadsto x - \color{blue}{a} \]
                              4. Step-by-step derivation
                                1. Applied rewrites57.7%

                                  \[\leadsto x - \color{blue}{a} \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification66.9%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+43} \lor \neg \left(t \leq 1.36 \cdot 10^{+29}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 11: 65.6% accurate, 2.2× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.33 \cdot 10^{-69} \lor \neg \left(z \leq 1.4 \cdot 10^{+59}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (or (<= z -1.33e-69) (not (<= z 1.4e+59))) (- x a) x))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if ((z <= -1.33e-69) || !(z <= 1.4e+59)) {
                              		tmp = x - a;
                              	} else {
                              		tmp = x;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8) :: tmp
                                  if ((z <= (-1.33d-69)) .or. (.not. (z <= 1.4d+59))) then
                                      tmp = x - a
                                  else
                                      tmp = x
                                  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.33e-69) || !(z <= 1.4e+59)) {
                              		tmp = x - a;
                              	} else {
                              		tmp = x;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if (z <= -1.33e-69) or not (z <= 1.4e+59):
                              		tmp = x - a
                              	else:
                              		tmp = x
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if ((z <= -1.33e-69) || !(z <= 1.4e+59))
                              		tmp = Float64(x - a);
                              	else
                              		tmp = x;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if ((z <= -1.33e-69) || ~((z <= 1.4e+59)))
                              		tmp = x - a;
                              	else
                              		tmp = x;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.33e-69], N[Not[LessEqual[z, 1.4e+59]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -1.33 \cdot 10^{-69} \lor \neg \left(z \leq 1.4 \cdot 10^{+59}\right):\\
                              \;\;\;\;x - a\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -1.32999999999999992e-69 or 1.3999999999999999e59 < z

                                1. Initial program 98.4%

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

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

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

                                  if -1.32999999999999992e-69 < z < 1.3999999999999999e59

                                  1. Initial program 99.8%

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

                                    \[\leadsto \color{blue}{x} \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites51.5%

                                      \[\leadsto \color{blue}{x} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Final simplification62.0%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.33 \cdot 10^{-69} \lor \neg \left(z \leq 1.4 \cdot 10^{+59}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                  7. Add Preprocessing

                                  Alternative 12: 53.4% accurate, 35.0× speedup?

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

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

                                    \[\leadsto \color{blue}{x} \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites47.9%

                                      \[\leadsto \color{blue}{x} \]
                                    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 2025064 
                                    (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))))