Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A

Percentage Accurate: 85.5% → 98.4%
Time: 3.7s
Alternatives: 17
Speedup: 1.0×

Specification

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

\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\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 17 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: 85.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 5.1999999999999997e187

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
      9. sub-divN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
      13. negate-sub2N/A

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

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

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

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

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

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

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

    if 5.1999999999999997e187 < y

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 700000:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.4000000000000002e59

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
      9. sub-divN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
      13. negate-sub2N/A

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

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

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

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

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

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

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

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

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

      if -5.4000000000000002e59 < z < 7e5

      1. Initial program 95.5%

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

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

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

        if 7e5 < z

        1. Initial program 74.6%

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
          9. sub-divN/A

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
          13. negate-sub2N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z}}, t, x\right) \]
        5. Step-by-step derivation
          1. Applied rewrites85.6%

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

        Alternative 4: 81.0% accurate, 0.8× speedup?

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

          1. Initial program 82.9%

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

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

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

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

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

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

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

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

          if -5.49999999999999977e124 < a < 1.34999999999999993e37

          1. Initial program 87.1%

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
            9. sub-divN/A

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

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
            13. negate-sub2N/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z}}, t, x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites77.0%

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

          Alternative 5: 78.8% accurate, 0.6× speedup?

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

            1. Initial program 73.0%

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
              9. sub-divN/A

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
              13. negate-sub2N/A

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

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

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

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

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

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

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

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

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

              if -1.95000000000000004e-20 < z < -1.4000000000000001e-168

              1. Initial program 96.4%

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

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

                  \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                2. lower-neg.f6458.4

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

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

                \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
              6. Step-by-step derivation
                1. Applied rewrites56.9%

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

                if -1.4000000000000001e-168 < z < 3.0999999999999997e-76

                1. Initial program 95.3%

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

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

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

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

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

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

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

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

                if 3.0999999999999997e-76 < z < 1.4e99

                1. Initial program 92.2%

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

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

                    \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                  2. lower-neg.f6468.0

                    \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                4. Applied rewrites68.0%

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

                  \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                6. Step-by-step derivation
                  1. Applied rewrites58.2%

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

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

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

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

                      \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                    5. lower-/.f6459.2

                      \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
                  3. Applied rewrites59.2%

                    \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                7. Recombined 4 regimes into one program.
                8. Add Preprocessing

                Alternative 6: 76.7% accurate, 0.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+118}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-168}:\\ \;\;\;\;x + \frac{y \cdot t}{-z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-76}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y - z}{a}, x\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+102}:\\ \;\;\;\;x + y \cdot \frac{t}{-z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (<= z -7.2e+118)
                   (+ x t)
                   (if (<= z -1.4e-168)
                     (+ x (/ (* y t) (- z)))
                     (if (<= z 3.1e-76)
                       (fma t (/ (- y z) a) x)
                       (if (<= z 1.25e+102) (+ x (* y (/ t (- z)))) (+ x t))))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (z <= -7.2e+118) {
                		tmp = x + t;
                	} else if (z <= -1.4e-168) {
                		tmp = x + ((y * t) / -z);
                	} else if (z <= 3.1e-76) {
                		tmp = fma(t, ((y - z) / a), x);
                	} else if (z <= 1.25e+102) {
                		tmp = x + (y * (t / -z));
                	} else {
                		tmp = x + t;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (z <= -7.2e+118)
                		tmp = Float64(x + t);
                	elseif (z <= -1.4e-168)
                		tmp = Float64(x + Float64(Float64(y * t) / Float64(-z)));
                	elseif (z <= 3.1e-76)
                		tmp = fma(t, Float64(Float64(y - z) / a), x);
                	elseif (z <= 1.25e+102)
                		tmp = Float64(x + Float64(y * Float64(t / Float64(-z))));
                	else
                		tmp = Float64(x + t);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+118], N[(x + t), $MachinePrecision], If[LessEqual[z, -1.4e-168], N[(x + N[(N[(y * t), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-76], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.25e+102], N[(x + N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -7.2 \cdot 10^{+118}:\\
                \;\;\;\;x + t\\
                
                \mathbf{elif}\;z \leq -1.4 \cdot 10^{-168}:\\
                \;\;\;\;x + \frac{y \cdot t}{-z}\\
                
                \mathbf{elif}\;z \leq 3.1 \cdot 10^{-76}:\\
                \;\;\;\;\mathsf{fma}\left(t, \frac{y - z}{a}, x\right)\\
                
                \mathbf{elif}\;z \leq 1.25 \cdot 10^{+102}:\\
                \;\;\;\;x + y \cdot \frac{t}{-z}\\
                
                \mathbf{else}:\\
                \;\;\;\;x + t\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if z < -7.2e118 or 1.25e102 < z

                  1. Initial program 67.5%

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

                    \[\leadsto x + \color{blue}{t} \]
                  3. Step-by-step derivation
                    1. Applied rewrites83.3%

                      \[\leadsto x + \color{blue}{t} \]

                    if -7.2e118 < z < -1.4000000000000001e-168

                    1. Initial program 93.4%

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

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

                        \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                      2. lower-neg.f6464.1

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

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

                      \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                    6. Step-by-step derivation
                      1. Applied rewrites59.4%

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

                      if -1.4000000000000001e-168 < z < 3.0999999999999997e-76

                      1. Initial program 95.3%

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

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

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

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

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

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

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

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

                      if 3.0999999999999997e-76 < z < 1.25e102

                      1. Initial program 92.1%

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

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

                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                        2. lower-neg.f6467.9

                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                      4. Applied rewrites67.9%

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

                        \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                      6. Step-by-step derivation
                        1. Applied rewrites58.1%

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

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

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

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

                            \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                          5. lower-/.f6459.1

                            \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
                        3. Applied rewrites59.1%

                          \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                      7. Recombined 4 regimes into one program.
                      8. Add Preprocessing

                      Alternative 7: 76.0% accurate, 0.6× speedup?

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

                        1. Initial program 67.5%

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

                          \[\leadsto x + \color{blue}{t} \]
                        3. Step-by-step derivation
                          1. Applied rewrites83.3%

                            \[\leadsto x + \color{blue}{t} \]

                          if -7.2e118 < z < -2.69999999999999984e-87

                          1. Initial program 92.5%

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

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

                              \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                            2. lower-neg.f6468.1

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

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

                            \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                          6. Step-by-step derivation
                            1. Applied rewrites61.6%

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

                            if -2.69999999999999984e-87 < z < 3.0999999999999997e-76

                            1. Initial program 95.3%

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

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

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

                                \[\leadsto x + \frac{t \cdot y}{a} \]
                            4. Applied rewrites80.4%

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

                            if 3.0999999999999997e-76 < z < 1.25e102

                            1. Initial program 92.1%

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

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

                                \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                              2. lower-neg.f6467.9

                                \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                            4. Applied rewrites67.9%

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

                              \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                            6. Step-by-step derivation
                              1. Applied rewrites58.1%

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

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

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

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

                                  \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                                5. lower-/.f6459.1

                                  \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
                              3. Applied rewrites59.1%

                                \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                            7. Recombined 4 regimes into one program.
                            8. Add Preprocessing

                            Alternative 8: 75.5% accurate, 0.6× speedup?

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

                              1. Initial program 67.4%

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

                                \[\leadsto x + \color{blue}{t} \]
                              3. Step-by-step derivation
                                1. Applied rewrites83.3%

                                  \[\leadsto x + \color{blue}{t} \]

                                if -7.50000000000000003e118 < z < -3.19999999999999979e-87

                                1. Initial program 92.5%

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

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

                                    \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                                  2. lower-neg.f6468.2

                                    \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                                4. Applied rewrites68.2%

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

                                  \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites61.7%

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

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

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

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

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

                                      \[\leadsto \color{blue}{y \cdot \frac{t}{-z}} + x \]
                                    6. lower-fma.f64N/A

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

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

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

                                  if -3.19999999999999979e-87 < z < 3.0999999999999997e-76

                                  1. Initial program 95.3%

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

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

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

                                      \[\leadsto x + \frac{t \cdot y}{a} \]
                                  4. Applied rewrites80.4%

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

                                  if 3.0999999999999997e-76 < z < 1.25e102

                                  1. Initial program 92.1%

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

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

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                                    2. lower-neg.f6467.9

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                                  4. Applied rewrites67.9%

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

                                    \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites58.1%

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

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

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

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

                                        \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                                      5. lower-/.f6459.1

                                        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
                                    3. Applied rewrites59.1%

                                      \[\leadsto x + \color{blue}{y \cdot \frac{t}{-z}} \]
                                  7. Recombined 4 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 9: 75.5% accurate, 0.6× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+118}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{-z}, x\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+102}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-y}{z}, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (if (<= z -7.5e+118)
                                     (+ x t)
                                     (if (<= z -3.2e-87)
                                       (fma y (/ t (- z)) x)
                                       (if (<= z 3.1e-76)
                                         (+ x (/ (* t y) a))
                                         (if (<= z 1.25e+102) (fma (/ (- y) z) t x) (+ x t))))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double tmp;
                                  	if (z <= -7.5e+118) {
                                  		tmp = x + t;
                                  	} else if (z <= -3.2e-87) {
                                  		tmp = fma(y, (t / -z), x);
                                  	} else if (z <= 3.1e-76) {
                                  		tmp = x + ((t * y) / a);
                                  	} else if (z <= 1.25e+102) {
                                  		tmp = fma((-y / z), t, x);
                                  	} else {
                                  		tmp = x + t;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a)
                                  	tmp = 0.0
                                  	if (z <= -7.5e+118)
                                  		tmp = Float64(x + t);
                                  	elseif (z <= -3.2e-87)
                                  		tmp = fma(y, Float64(t / Float64(-z)), x);
                                  	elseif (z <= 3.1e-76)
                                  		tmp = Float64(x + Float64(Float64(t * y) / a));
                                  	elseif (z <= 1.25e+102)
                                  		tmp = fma(Float64(Float64(-y) / z), t, x);
                                  	else
                                  		tmp = Float64(x + t);
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+118], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.2e-87], N[(y * N[(t / (-z)), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.1e-76], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+102], N[(N[((-y) / z), $MachinePrecision] * t + x), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;z \leq -7.5 \cdot 10^{+118}:\\
                                  \;\;\;\;x + t\\
                                  
                                  \mathbf{elif}\;z \leq -3.2 \cdot 10^{-87}:\\
                                  \;\;\;\;\mathsf{fma}\left(y, \frac{t}{-z}, x\right)\\
                                  
                                  \mathbf{elif}\;z \leq 3.1 \cdot 10^{-76}:\\
                                  \;\;\;\;x + \frac{t \cdot y}{a}\\
                                  
                                  \mathbf{elif}\;z \leq 1.25 \cdot 10^{+102}:\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{-y}{z}, t, x\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x + t\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 4 regimes
                                  2. if z < -7.50000000000000003e118 or 1.25e102 < z

                                    1. Initial program 67.4%

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

                                      \[\leadsto x + \color{blue}{t} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites83.3%

                                        \[\leadsto x + \color{blue}{t} \]

                                      if -7.50000000000000003e118 < z < -3.19999999999999979e-87

                                      1. Initial program 92.5%

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

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

                                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                                        2. lower-neg.f6468.2

                                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{-z} \]
                                      4. Applied rewrites68.2%

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

                                        \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites61.7%

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

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

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

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

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

                                            \[\leadsto \color{blue}{y \cdot \frac{t}{-z}} + x \]
                                          6. lower-fma.f64N/A

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

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

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

                                        if -3.19999999999999979e-87 < z < 3.0999999999999997e-76

                                        1. Initial program 95.3%

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

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

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

                                            \[\leadsto x + \frac{t \cdot y}{a} \]
                                        4. Applied rewrites80.4%

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

                                        if 3.0999999999999997e-76 < z < 1.25e102

                                        1. Initial program 92.1%

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} + x \]
                                          9. sub-divN/A

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t, x\right) \]
                                          13. negate-sub2N/A

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\frac{z - y}{\color{blue}{z}}, t, x\right) \]
                                        5. Step-by-step derivation
                                          1. Applied rewrites70.2%

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

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

                                              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(y\right)}{z}, t, x\right) \]
                                            2. lift-neg.f6458.7

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

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

                                        Alternative 10: 75.4% accurate, 0.6× speedup?

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

                                          1. Initial program 67.4%

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

                                            \[\leadsto x + \color{blue}{t} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites83.3%

                                              \[\leadsto x + \color{blue}{t} \]

                                            if -7.50000000000000003e118 < z < -3.19999999999999979e-87 or 3.0999999999999997e-76 < z < 1.25e102

                                            1. Initial program 92.3%

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

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

                                                \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(z\right)} \]
                                              2. lower-neg.f6468.1

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

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

                                              \[\leadsto x + \frac{\color{blue}{y} \cdot t}{-z} \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites59.9%

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

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

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

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

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

                                                  \[\leadsto \color{blue}{y \cdot \frac{t}{-z}} + x \]
                                                6. lower-fma.f64N/A

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t}{-z}, x\right)} \]
                                                7. lower-/.f6461.1

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

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

                                              if -3.19999999999999979e-87 < z < 3.0999999999999997e-76

                                              1. Initial program 95.3%

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

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

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

                                                  \[\leadsto x + \frac{t \cdot y}{a} \]
                                              4. Applied rewrites80.4%

                                                \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
                                            7. Recombined 3 regimes into one program.
                                            8. Add Preprocessing

                                            Alternative 11: 75.3% accurate, 0.9× speedup?

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

                                              1. Initial program 74.7%

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

                                                \[\leadsto x + \color{blue}{t} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites76.1%

                                                  \[\leadsto x + \color{blue}{t} \]

                                                if -4.89999999999999979e22 < z < 1.7999999999999999e-13

                                                1. Initial program 95.7%

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

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

                                                    \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
                                                  2. lower-*.f6475.9

                                                    \[\leadsto x + \frac{t \cdot y}{a} \]
                                                4. Applied rewrites75.9%

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

                                              Alternative 12: 75.1% accurate, 0.9× speedup?

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

                                                1. Initial program 74.7%

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

                                                  \[\leadsto x + \color{blue}{t} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites76.1%

                                                    \[\leadsto x + \color{blue}{t} \]

                                                  if -5.4000000000000004e22 < z < 1.7999999999999999e-13

                                                  1. Initial program 95.7%

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{a}}, x\right) \]
                                                    4. lower-/.f6477.3

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

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

                                                Alternative 13: 62.7% accurate, 1.3× speedup?

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

                                                  1. Initial program 82.2%

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

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

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

                                                    if -5.50000000000000035e142 < a < 8.49999999999999983e111

                                                    1. Initial program 86.9%

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

                                                      \[\leadsto x + \color{blue}{t} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites61.0%

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

                                                    Alternative 14: 60.2% accurate, 1.4× speedup?

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

                                                      1. Initial program 77.9%

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

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

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

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

                                                          \[\leadsto t \cdot \frac{y}{\color{blue}{a - z}} \]
                                                        4. lift--.f6466.8

                                                          \[\leadsto t \cdot \frac{y}{a - \color{blue}{z}} \]
                                                      4. Applied rewrites66.8%

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

                                                        \[\leadsto t \cdot \frac{y}{a} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites40.4%

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

                                                        if -3.30000000000000023e242 < y

                                                        1. Initial program 85.9%

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

                                                          \[\leadsto x + \color{blue}{t} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites61.2%

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

                                                        Alternative 15: 60.0% accurate, 1.4× speedup?

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

                                                          1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{t \cdot y}{a} \]
                                                            2. lower-/.f64N/A

                                                              \[\leadsto \frac{t \cdot y}{a} \]
                                                            3. lower-*.f6436.7

                                                              \[\leadsto \frac{t \cdot y}{a} \]
                                                          7. Applied rewrites36.7%

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

                                                          if -3.30000000000000023e242 < y

                                                          1. Initial program 85.9%

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

                                                            \[\leadsto x + \color{blue}{t} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites61.2%

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

                                                          Alternative 16: 54.0% accurate, 0.5× speedup?

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

                                                            1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto t \]
                                                            6. Step-by-step derivation
                                                              1. associate-*r/26.5

                                                                \[\leadsto t \]
                                                            7. Applied rewrites26.5%

                                                              \[\leadsto t \]

                                                            if -9.99999999999999944e71 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 3.9999999999999997e168

                                                            1. Initial program 99.5%

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

                                                              \[\leadsto \color{blue}{x} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites69.6%

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

                                                            Alternative 17: 50.7% accurate, 15.3× speedup?

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

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

                                                              \[\leadsto \color{blue}{x} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites50.7%

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

                                                              Reproduce

                                                              ?
                                                              herbie shell --seed 2025110 
                                                              (FPCore (x y z t a)
                                                                :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
                                                                :precision binary64
                                                                (+ x (/ (* (- y z) t) (- a z))))