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

Percentage Accurate: 97.0% → 97.0%
Time: 8.1s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 97.0% 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: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 71.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{\left(t - z\right) - -1}{a}}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+177}\right):\\ \;\;\;\;a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \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 (- INFINITY)) (not (<= t_1 5e+177)))
     (* a (/ y (- -1.0 t)))
     (fma (/ z (- 1.0 z)) 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 <= -((double) INFINITY)) || !(t_1 <= 5e+177)) {
		tmp = a * (y / (-1.0 - t));
	} else {
		tmp = fma((z / (1.0 - z)), a, 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 <= Float64(-Inf)) || !(t_1 <= 5e+177))
		tmp = Float64(a * Float64(y / Float64(-1.0 - t)));
	else
		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
	end
	return 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, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+177]], $MachinePrecision]], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}

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

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


\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)) < -inf.0 or 5.0000000000000003e177 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
    7. Step-by-step derivation
      1. Applied rewrites79.7%

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

      if -inf.0 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 5.0000000000000003e177

      1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 90.1% accurate, 0.9× speedup?

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

        1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

        if -9e44 < y < 5.1999999999999998e38

        1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification92.7%

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

      Alternative 4: 91.0% accurate, 0.9× speedup?

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

        1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.5e23 < t < 8.9999999999999993e82

        1. Initial program 97.4%

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

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

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

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

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

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

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

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

          \[\leadsto x - \color{blue}{\left(y - z\right) \cdot \frac{a}{1 - z}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.8%

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

      Alternative 5: 74.8% accurate, 0.9× speedup?

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

        1. Initial program 94.0%

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

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

            \[\leadsto \color{blue}{x - a} \]
        5. Applied rewrites77.9%

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

        if -1.15e17 < z < 1.22e-80

        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 0

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

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

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

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

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

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

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

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

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

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

          if 1.22e-80 < z < 3.80000000000000022e73

          1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \frac{y}{t} \cdot a \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 6: 87.4% accurate, 0.9× speedup?

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

            1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.2e18 < z < 2.6999999999999998e69

            1. Initial program 99.2%

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

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

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

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

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

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

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

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

            if 2.6999999999999998e69 < z

            1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 86.8% accurate, 1.0× speedup?

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

              1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.2e18 < z < 4.5000000000000001e137

              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

            Alternative 8: 73.9% accurate, 1.0× speedup?

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

              1. Initial program 94.0%

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

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

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

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

              if -1.15e17 < z < 2.5000000000000001e-109

              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 0

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

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

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

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

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

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

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

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

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

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

                if 2.5000000000000001e-109 < z < 5.8e7

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 84.0% accurate, 1.0× speedup?

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

                  1. Initial program 93.0%

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

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

                      \[\leadsto \color{blue}{x - a} \]
                  5. Applied rewrites81.6%

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

                  if -1.4e19 < z < 4.5000000000000001e137

                  1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                Alternative 10: 75.2% accurate, 1.0× speedup?

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

                  1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.89999999999999988e141 < t < 1.1e-16

                  1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 74.1% accurate, 1.7× speedup?

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

                    1. Initial program 94.1%

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

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

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

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

                    if -1.05e18 < z < 1.1000000000000001

                    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 0

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 66.8% accurate, 1.9× speedup?

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

                      1. Initial program 94.3%

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

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

                          \[\leadsto \color{blue}{x - a} \]
                      5. Applied rewrites72.7%

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

                      if -1.22e-30 < z < 3.9e6

                      1. Initial program 99.9%

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

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

                          \[\leadsto \color{blue}{x - a} \]
                      5. Applied rewrites45.7%

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

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

                          \[\leadsto -a \]
                        2. Taylor expanded in x around inf

                          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \frac{a}{x}\right)} \]
                        3. Step-by-step derivation
                          1. Applied rewrites47.2%

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

                            \[\leadsto 1 \cdot x \]
                          3. Step-by-step derivation
                            1. Applied rewrites60.9%

                              \[\leadsto 1 \cdot x \]
                          4. Recombined 2 regimes into one program.
                          5. Final simplification67.1%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{-30} \lor \neg \left(z \leq 3900000\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 13: 60.8% accurate, 8.8× speedup?

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

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

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

                              \[\leadsto \color{blue}{x - a} \]
                          5. Applied rewrites59.8%

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

                          Alternative 14: 16.2% accurate, 11.7× speedup?

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

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

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

                              \[\leadsto \color{blue}{x - a} \]
                          5. Applied rewrites59.8%

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

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

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

                            Developer Target 1: 99.7% 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 2025008 
                            (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))))