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

Percentage Accurate: 85.6% → 96.8%
Time: 6.4s
Alternatives: 12
Speedup: 0.8×

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 12 alternatives:

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

Initial Program: 85.6% 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: 96.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{a - z} \cdot \left(y - z\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ t (- a z)) (- y z))) (t_2 (+ x (/ (* (- y z) t) (- a z)))))
   (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 2e+307) t_2 t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t / (a - z)) * (y - z);
	double t_2 = x + (((y - z) * t) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 2e+307) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t / (a - z)) * (y - z);
	double t_2 = x + (((y - z) * t) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= 2e+307) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t / (a - z)) * (y - z)
	t_2 = x + (((y - z) * t) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= 2e+307:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t / Float64(a - z)) * Float64(y - z))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 2e+307)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t / (a - z)) * (y - z);
	t_2 = x + (((y - z) * t) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= 2e+307)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+307], t$95$2, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{a - z} \cdot \left(y - z\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) < -inf.0 or 1.99999999999999997e307 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)))

    1. Initial program 39.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{a - z} \cdot \left(y - z\right) \]
      11. lift--.f6487.5

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) < 1.99999999999999997e307

    1. Initial program 99.7%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 87.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{z}{a - z} \cdot t\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.50000000000000069e68 or 1.4e-11 < z

    1. Initial program 73.6%

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

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

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

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

        \[\leadsto x + \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\frac{z}{a - z}} \]
      4. fp-cancel-sub-signN/A

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

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

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

        \[\leadsto x - t \cdot \color{blue}{\frac{z}{a - z}} \]
      8. *-commutativeN/A

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

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

        \[\leadsto x - \frac{z}{a - z} \cdot t \]
      11. lift--.f6486.3

        \[\leadsto x - \frac{z}{a - z} \cdot t \]
    4. Applied rewrites86.3%

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

    if -9.50000000000000069e68 < z < 1.4e-11

    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.1%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 84.9% accurate, 0.8× speedup?

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

      1. Initial program 68.6%

        \[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 rewrites82.8%

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

        if -9.19999999999999958e86 < z < 8e104

        1. Initial program 94.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 rewrites83.5%

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 78.1% accurate, 0.8× speedup?

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

          1. Initial program 73.0%

            \[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 rewrites78.2%

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

            if -2.1999999999999998e84 < z < 1.79999999999999992e-11

            1. Initial program 95.4%

              \[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. *-commutativeN/A

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

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

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

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

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

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

          Alternative 5: 75.9% accurate, 0.9× speedup?

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

            1. Initial program 68.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 rewrites82.7%

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

              if -1.65000000000000008e84 < z < 5.7999999999999997e104

              1. Initial program 94.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 rewrites83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 75.8% accurate, 0.9× speedup?

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

                  1. Initial program 68.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 rewrites82.7%

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

                    if -1.65000000000000008e84 < z < 7.59999999999999938e104

                    1. Initial program 94.5%

                      \[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. *-commutativeN/A

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

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

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

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

                  Alternative 7: 62.7% accurate, 0.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+285}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{-z} \cdot t\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (let* ((t_1 (/ (* (- y z) t) (- a z))))
                     (if (<= t_1 -2e-34)
                       (+ x t)
                       (if (<= t_1 3e-141) x (if (<= t_1 2e+285) (+ x t) (* (/ y (- z)) 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 <= -2e-34) {
                  		tmp = x + t;
                  	} else if (t_1 <= 3e-141) {
                  		tmp = x;
                  	} else if (t_1 <= 2e+285) {
                  		tmp = x + t;
                  	} else {
                  		tmp = (y / -z) * 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 <= (-2d-34)) then
                          tmp = x + t
                      else if (t_1 <= 3d-141) then
                          tmp = x
                      else if (t_1 <= 2d+285) then
                          tmp = x + t
                      else
                          tmp = (y / -z) * 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 <= -2e-34) {
                  		tmp = x + t;
                  	} else if (t_1 <= 3e-141) {
                  		tmp = x;
                  	} else if (t_1 <= 2e+285) {
                  		tmp = x + t;
                  	} else {
                  		tmp = (y / -z) * t;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	t_1 = ((y - z) * t) / (a - z)
                  	tmp = 0
                  	if t_1 <= -2e-34:
                  		tmp = x + t
                  	elif t_1 <= 3e-141:
                  		tmp = x
                  	elif t_1 <= 2e+285:
                  		tmp = x + t
                  	else:
                  		tmp = (y / -z) * 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 <= -2e-34)
                  		tmp = Float64(x + t);
                  	elseif (t_1 <= 3e-141)
                  		tmp = x;
                  	elseif (t_1 <= 2e+285)
                  		tmp = Float64(x + t);
                  	else
                  		tmp = Float64(Float64(y / Float64(-z)) * 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 <= -2e-34)
                  		tmp = x + t;
                  	elseif (t_1 <= 3e-141)
                  		tmp = x;
                  	elseif (t_1 <= 2e+285)
                  		tmp = x + t;
                  	else
                  		tmp = (y / -z) * 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, -2e-34], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 3e-141], x, If[LessEqual[t$95$1, 2e+285], N[(x + t), $MachinePrecision], N[(N[(y / (-z)), $MachinePrecision] * t), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\
                  \;\;\;\;x + t\\
                  
                  \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\
                  \;\;\;\;x\\
                  
                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+285}:\\
                  \;\;\;\;x + t\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{y}{-z} \cdot t\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -1.99999999999999986e-34 or 2.99999999999999983e-141 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e285

                    1. Initial program 86.2%

                      \[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 rewrites52.1%

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

                      if -1.99999999999999986e-34 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.99999999999999983e-141

                      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 rewrites84.1%

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

                        if 2e285 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                        1. Initial program 86.2%

                          \[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. *-commutativeN/A

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

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

                            \[\leadsto \frac{y}{a - z} \cdot t \]
                          5. lift--.f6436.9

                            \[\leadsto \frac{y}{a - z} \cdot t \]
                        4. Applied rewrites36.9%

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

                          \[\leadsto \frac{y}{-1 \cdot z} \cdot t \]
                        6. Step-by-step derivation
                          1. mul-1-negN/A

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

                            \[\leadsto \frac{y}{-z} \cdot t \]
                        7. Applied rewrites18.8%

                          \[\leadsto \frac{y}{-z} \cdot t \]
                      4. Recombined 3 regimes into one program.
                      5. Add Preprocessing

                      Alternative 8: 62.6% accurate, 0.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 10^{+265}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (let* ((t_1 (/ (* (- y z) t) (- a z))))
                         (if (<= t_1 -2e-34)
                           (+ x t)
                           (if (<= t_1 3e-141) x (if (<= t_1 1e+265) (+ x t) (* (/ y a) 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 <= -2e-34) {
                      		tmp = x + t;
                      	} else if (t_1 <= 3e-141) {
                      		tmp = x;
                      	} else if (t_1 <= 1e+265) {
                      		tmp = x + t;
                      	} else {
                      		tmp = (y / a) * 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 <= (-2d-34)) then
                              tmp = x + t
                          else if (t_1 <= 3d-141) then
                              tmp = x
                          else if (t_1 <= 1d+265) then
                              tmp = x + t
                          else
                              tmp = (y / a) * 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 <= -2e-34) {
                      		tmp = x + t;
                      	} else if (t_1 <= 3e-141) {
                      		tmp = x;
                      	} else if (t_1 <= 1e+265) {
                      		tmp = x + t;
                      	} else {
                      		tmp = (y / a) * t;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a):
                      	t_1 = ((y - z) * t) / (a - z)
                      	tmp = 0
                      	if t_1 <= -2e-34:
                      		tmp = x + t
                      	elif t_1 <= 3e-141:
                      		tmp = x
                      	elif t_1 <= 1e+265:
                      		tmp = x + t
                      	else:
                      		tmp = (y / a) * 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 <= -2e-34)
                      		tmp = Float64(x + t);
                      	elseif (t_1 <= 3e-141)
                      		tmp = x;
                      	elseif (t_1 <= 1e+265)
                      		tmp = Float64(x + t);
                      	else
                      		tmp = Float64(Float64(y / a) * 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 <= -2e-34)
                      		tmp = x + t;
                      	elseif (t_1 <= 3e-141)
                      		tmp = x;
                      	elseif (t_1 <= 1e+265)
                      		tmp = x + t;
                      	else
                      		tmp = (y / a) * 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, -2e-34], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 3e-141], x, If[LessEqual[t$95$1, 1e+265], N[(x + t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\
                      \;\;\;\;x + t\\
                      
                      \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\
                      \;\;\;\;x\\
                      
                      \mathbf{elif}\;t\_1 \leq 10^{+265}:\\
                      \;\;\;\;x + t\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{y}{a} \cdot t\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -1.99999999999999986e-34 or 2.99999999999999983e-141 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1.00000000000000007e265

                        1. Initial program 86.0%

                          \[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 rewrites52.3%

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

                          if -1.99999999999999986e-34 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.99999999999999983e-141

                          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 rewrites84.1%

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

                            if 1.00000000000000007e265 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                            1. Initial program 86.0%

                              \[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. *-commutativeN/A

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

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

                                \[\leadsto \frac{y}{a - z} \cdot t \]
                              5. lift--.f6436.7

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

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

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

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

                            Alternative 9: 61.8% accurate, 0.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+133}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{-z}\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (let* ((t_1 (/ (* (- y z) t) (- a z))))
                               (if (<= t_1 -2e-34) (+ x t) (if (<= t_1 5e+133) x (/ (* t y) (- z))))))
                            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 <= -2e-34) {
                            		tmp = x + t;
                            	} else if (t_1 <= 5e+133) {
                            		tmp = x;
                            	} else {
                            		tmp = (t * y) / -z;
                            	}
                            	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 <= (-2d-34)) then
                                    tmp = x + t
                                else if (t_1 <= 5d+133) then
                                    tmp = x
                                else
                                    tmp = (t * y) / -z
                                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 <= -2e-34) {
                            		tmp = x + t;
                            	} else if (t_1 <= 5e+133) {
                            		tmp = x;
                            	} else {
                            		tmp = (t * y) / -z;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	t_1 = ((y - z) * t) / (a - z)
                            	tmp = 0
                            	if t_1 <= -2e-34:
                            		tmp = x + t
                            	elif t_1 <= 5e+133:
                            		tmp = x
                            	else:
                            		tmp = (t * y) / -z
                            	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 <= -2e-34)
                            		tmp = Float64(x + t);
                            	elseif (t_1 <= 5e+133)
                            		tmp = x;
                            	else
                            		tmp = Float64(Float64(t * y) / Float64(-z));
                            	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 <= -2e-34)
                            		tmp = x + t;
                            	elseif (t_1 <= 5e+133)
                            		tmp = x;
                            	else
                            		tmp = (t * y) / -z;
                            	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, -2e-34], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 5e+133], x, N[(N[(t * y), $MachinePrecision] / (-z)), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\
                            \;\;\;\;x + t\\
                            
                            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+133}:\\
                            \;\;\;\;x\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{t \cdot y}{-z}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -1.99999999999999986e-34

                              1. Initial program 74.1%

                                \[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 rewrites47.0%

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

                                if -1.99999999999999986e-34 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.99999999999999961e133

                                1. Initial program 99.6%

                                  \[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 rewrites74.0%

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

                                  if 4.99999999999999961e133 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                                  1. Initial program 57.5%

                                    \[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. *-commutativeN/A

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

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

                                      \[\leadsto \frac{y}{a - z} \cdot t \]
                                    5. lift--.f6451.9

                                      \[\leadsto \frac{y}{a - z} \cdot t \]
                                  4. Applied rewrites51.9%

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

                                    \[\leadsto \frac{y}{-1 \cdot z} \cdot t \]
                                  6. Step-by-step derivation
                                    1. mul-1-negN/A

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

                                      \[\leadsto \frac{y}{-z} \cdot t \]
                                  7. Applied rewrites30.8%

                                    \[\leadsto \frac{y}{-z} \cdot t \]
                                  8. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

                                      \[\leadsto \frac{t \cdot y}{\color{blue}{-z}} \]
                                    6. lift-*.f6428.0

                                      \[\leadsto \frac{t \cdot y}{-\color{blue}{z}} \]
                                  9. Applied rewrites28.0%

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

                                Alternative 10: 58.9% accurate, 0.4× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                                (FPCore (x y z t a)
                                 :precision binary64
                                 (let* ((t_1 (/ (* (- y z) t) (- a z))))
                                   (if (<= t_1 -2e-34) (+ x t) (if (<= t_1 3e-141) x (+ 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 <= -2e-34) {
                                		tmp = x + t;
                                	} else if (t_1 <= 3e-141) {
                                		tmp = x;
                                	} 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) :: t_1
                                    real(8) :: tmp
                                    t_1 = ((y - z) * t) / (a - z)
                                    if (t_1 <= (-2d-34)) then
                                        tmp = x + t
                                    else if (t_1 <= 3d-141) then
                                        tmp = x
                                    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 t_1 = ((y - z) * t) / (a - z);
                                	double tmp;
                                	if (t_1 <= -2e-34) {
                                		tmp = x + t;
                                	} else if (t_1 <= 3e-141) {
                                		tmp = x;
                                	} else {
                                		tmp = x + t;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a):
                                	t_1 = ((y - z) * t) / (a - z)
                                	tmp = 0
                                	if t_1 <= -2e-34:
                                		tmp = x + t
                                	elif t_1 <= 3e-141:
                                		tmp = x
                                	else:
                                		tmp = x + 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 <= -2e-34)
                                		tmp = Float64(x + t);
                                	elseif (t_1 <= 3e-141)
                                		tmp = x;
                                	else
                                		tmp = Float64(x + 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 <= -2e-34)
                                		tmp = x + t;
                                	elseif (t_1 <= 3e-141)
                                		tmp = x;
                                	else
                                		tmp = x + 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, -2e-34], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 3e-141], x, N[(x + t), $MachinePrecision]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                                \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-34}:\\
                                \;\;\;\;x + t\\
                                
                                \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{-141}:\\
                                \;\;\;\;x\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;x + t\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -1.99999999999999986e-34 or 2.99999999999999983e-141 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                                  1. Initial program 77.2%

                                    \[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 rewrites49.8%

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

                                    if -1.99999999999999986e-34 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.99999999999999983e-141

                                    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 rewrites84.1%

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

                                    Alternative 11: 55.9% 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 -2 \cdot 10^{+252}:\\ \;\;\;\;t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+156}:\\ \;\;\;\;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 -2e+252) t (if (<= t_1 5e+156) 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 <= -2e+252) {
                                    		tmp = t;
                                    	} else if (t_1 <= 5e+156) {
                                    		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 <= (-2d+252)) then
                                            tmp = t
                                        else if (t_1 <= 5d+156) 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 <= -2e+252) {
                                    		tmp = t;
                                    	} else if (t_1 <= 5e+156) {
                                    		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 <= -2e+252:
                                    		tmp = t
                                    	elif t_1 <= 5e+156:
                                    		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 <= -2e+252)
                                    		tmp = t;
                                    	elseif (t_1 <= 5e+156)
                                    		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 <= -2e+252)
                                    		tmp = t;
                                    	elseif (t_1 <= 5e+156)
                                    		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, -2e+252], t, If[LessEqual[t$95$1, 5e+156], x, t]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                                    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+252}:\\
                                    \;\;\;\;t\\
                                    
                                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+156}:\\
                                    \;\;\;\;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)) < -2.0000000000000002e252 or 4.99999999999999992e156 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                                      1. Initial program 50.5%

                                        \[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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{t}{a - z} \cdot \left(y - z\right) \]
                                        11. lift--.f6485.2

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

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

                                        \[\leadsto t \]
                                      6. Step-by-step derivation
                                        1. *-commutative30.3

                                          \[\leadsto t \]
                                        2. associate-/l*30.3

                                          \[\leadsto t \]
                                      7. Applied rewrites30.3%

                                        \[\leadsto t \]

                                      if -2.0000000000000002e252 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.99999999999999992e156

                                      1. Initial program 99.6%

                                        \[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.1%

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

                                      Alternative 12: 51.0% 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.6%

                                        \[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 rewrites51.0%

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

                                        Reproduce

                                        ?
                                        herbie shell --seed 2025130 
                                        (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))))