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

Percentage Accurate: 97.1% → 99.6%
Time: 6.6s
Alternatives: 15
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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 97.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
    14. metadata-eval99.6

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

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

Alternative 2: 97.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+190}:\\
\;\;\;\;x - \frac{z - y}{z - 1} \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4e190

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
      14. metadata-eval99.6

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

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

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

        \[\leadsto x - \frac{z - y}{z - \color{blue}{1}} \cdot a \]
    6. Applied rewrites79.6%

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

    if -4.4e190 < z

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.6% accurate, 0.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2600000000000001e97

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
      14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
      20. lower--.f6499.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2600000000000001e97 < t < 9.9999999999999995e32

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
      14. metadata-eval99.6

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

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

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

        \[\leadsto x - \frac{z - y}{z - \color{blue}{1}} \cdot a \]
    6. Applied rewrites79.6%

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

    if 9.9999999999999995e32 < t

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
      14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
      20. lower--.f6499.5

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

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

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

        \[\leadsto x - \frac{a}{\frac{t}{\color{blue}{y - z}}} \]
      2. lower--.f6454.1

        \[\leadsto x - \frac{a}{\frac{t}{y - \color{blue}{z}}} \]
    8. Applied rewrites54.1%

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

Alternative 4: 91.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{a}{t - -1}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05999999999999994e27 or 6.3999999999999998e-18 < z

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
      14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.05999999999999994e27 < z < 6.3999999999999998e-18

      1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 89.9% accurate, 0.8× speedup?

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

        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
          14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
          20. lower--.f6499.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.50000000000000017e95 < t < 9.9999999999999995e32

        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
          14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
          20. lower--.f6499.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.9999999999999995e32 < t

        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
          14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
          20. lower--.f6499.5

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

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

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

            \[\leadsto x - \frac{a}{\frac{t}{\color{blue}{y - z}}} \]
          2. lower--.f6454.1

            \[\leadsto x - \frac{a}{\frac{t}{y - \color{blue}{z}}} \]
        8. Applied rewrites54.1%

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

      Alternative 6: 87.1% accurate, 0.8× speedup?

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

        1. Initial program 97.1%

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

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

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

          if -9.4999999999999995e92 < z < 6.3999999999999998e-18

          1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 6.3999999999999998e-18 < z

            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
              14. metadata-eval99.6

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

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

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

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

                \[\leadsto x - \frac{z}{\color{blue}{z - 1}} \cdot a \]
              3. Step-by-step derivation
                1. lower--.f6465.9

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

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

            Alternative 7: 84.7% accurate, 0.8× speedup?

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

              1. Initial program 97.1%

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

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

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

                if -2.7999999999999998e89 < z < -8.50000000000000037e-11

                1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
                  14. metadata-eval99.6

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

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

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

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

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

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

                    if -8.50000000000000037e-11 < z < 5.2000000000000001e-18

                    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 5.2000000000000001e-18 < z

                    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
                      14. metadata-eval99.6

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

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

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

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

                        \[\leadsto x - \frac{z}{\color{blue}{z - 1}} \cdot a \]
                      3. Step-by-step derivation
                        1. lower--.f6465.9

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

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

                    Alternative 8: 84.4% accurate, 0.9× speedup?

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

                      1. Initial program 97.1%

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

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

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

                        if -8.7999999999999995e27 < z < 5.2000000000000001e-18

                        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 5.2000000000000001e-18 < z

                        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
                          14. metadata-eval99.6

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

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

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

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

                            \[\leadsto x - \frac{z}{\color{blue}{z - 1}} \cdot a \]
                          3. Step-by-step derivation
                            1. lower--.f6465.9

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

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

                        Alternative 9: 83.5% accurate, 0.9× speedup?

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

                          1. Initial program 97.1%

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

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

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

                            if -8.7999999999999995e27 < z < 1.3e29

                            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 79.6% accurate, 0.9× speedup?

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

                            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
                              14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
                              20. lower--.f6499.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -62 < t < 1.69999999999999989e32

                            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 11: 73.2% accurate, 0.8× speedup?

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

                            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \frac{z - y}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) - \left(t - z\right)}} \cdot a \]
                              14. metadata-eval99.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \frac{a}{\frac{\left(t - z\right) - \color{blue}{-1}}{y - z}} \]
                              20. lower--.f6499.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -2.0499999999999998 < t < -1.8e-266

                            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

                                \[\leadsto x - \frac{a \cdot y}{1} \]
                              3. Step-by-step derivation
                                1. lower-*.f6457.2

                                  \[\leadsto x - \frac{a \cdot y}{1} \]
                              4. Applied rewrites57.2%

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

                              if -1.8e-266 < t < 3.2e-30

                              1. Initial program 97.1%

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

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

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

                              Alternative 12: 73.1% accurate, 1.0× speedup?

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

                                1. Initial program 97.1%

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

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

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

                                  if -1.42e26 < z < 1

                                  1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto x - \frac{a \cdot y}{1} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f6457.2

                                        \[\leadsto x - \frac{a \cdot y}{1} \]
                                    4. Applied rewrites57.2%

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

                                  Alternative 13: 65.9% accurate, 1.0× speedup?

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

                                    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

                                    if -7.6000000000000007e113 < t < 1.3999999999999999e-32

                                    1. Initial program 97.1%

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

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

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

                                    Alternative 14: 65.2% accurate, 1.6× speedup?

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

                                      1. Initial program 97.1%

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

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

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

                                        if -5.50000000000000014e-76 < z < 1.1000000000000001

                                        1. Initial program 97.1%

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

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

                                            \[\leadsto x - \color{blue}{a} \]
                                          2. Step-by-step derivation
                                            1. lift--.f64N/A

                                              \[\leadsto \color{blue}{x - a} \]
                                            2. sub-to-multN/A

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

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

                                              \[\leadsto \color{blue}{\left(1 - \frac{a}{x}\right)} \cdot x \]
                                            5. lower-/.f6457.4

                                              \[\leadsto \left(1 - \color{blue}{\frac{a}{x}}\right) \cdot x \]
                                          3. Applied rewrites57.4%

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

                                            \[\leadsto \color{blue}{1} \cdot x \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites53.0%

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

                                          Alternative 15: 59.8% accurate, 5.1× speedup?

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

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

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

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

                                            Reproduce

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