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

Percentage Accurate: 84.7% → 98.2%
Time: 3.6s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 84.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.2% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.69999999999999989e-26 or 3.9999999999999999e24 < z

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot z}{\color{blue}{a - z}}, t, x\right) \]
      2. mul-1-negN/A

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

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

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

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

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

    if -4.69999999999999989e-26 < z < 3.9999999999999999e24

    1. Initial program 95.7%

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

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

    Alternative 3: 83.6% accurate, 0.8× speedup?

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

      1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{y - z}{a - z} \cdot t \]
        9. lift--.f64N/A

          \[\leadsto \frac{y - z}{a - z} \cdot t \]
        10. lift--.f6478.3

          \[\leadsto \frac{y - z}{a - z} \cdot t \]
      6. Applied rewrites78.3%

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

      if -5.8999999999999997e110 < t < 3.00000000000000006e91

      1. Initial program 96.4%

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

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

      Alternative 4: 82.5% accurate, 0.8× speedup?

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

        1. Initial program 70.4%

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

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

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

          if -2.9499999999999999e29 < z < 5.4e62

          1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 76.0% accurate, 0.8× speedup?

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

            1. Initial program 77.4%

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

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

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

              if -8 < z < 2.25000000000000013e-126

              1. Initial program 95.8%

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

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

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

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

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

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

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

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

            Alternative 6: 75.0% accurate, 0.9× speedup?

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

              1. Initial program 78.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 rewrites70.9%

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

                if -1.1e-26 < z < 2.64999999999999997e-126

                1. Initial program 95.7%

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

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

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

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

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

              Alternative 7: 74.5% accurate, 0.9× speedup?

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

                1. Initial program 78.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 rewrites70.9%

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

                  if -1.2e-26 < z < 2.64999999999999997e-126

                  1. Initial program 95.7%

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

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

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

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

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

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

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

                Alternative 8: 62.5% 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 -1 \cdot 10^{-175}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 10^{-205}:\\ \;\;\;\;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 -1e-175) (+ x t) (if (<= t_1 1e-205) 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 <= -1e-175) {
                		tmp = x + t;
                	} else if (t_1 <= 1e-205) {
                		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 <= (-1d-175)) then
                        tmp = x + t
                    else if (t_1 <= 1d-205) 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 <= -1e-175) {
                		tmp = x + t;
                	} else if (t_1 <= 1e-205) {
                		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 <= -1e-175:
                		tmp = x + t
                	elif t_1 <= 1e-205:
                		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 <= -1e-175)
                		tmp = Float64(x + t);
                	elseif (t_1 <= 1e-205)
                		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 <= -1e-175)
                		tmp = x + t;
                	elseif (t_1 <= 1e-205)
                		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, -1e-175], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 1e-205], 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 -1 \cdot 10^{-175}:\\
                \;\;\;\;x + t\\
                
                \mathbf{elif}\;t\_1 \leq 10^{-205}:\\
                \;\;\;\;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)) < -1e-175 or 1e-205 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                  1. Initial program 80.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 rewrites52.9%

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

                    if -1e-175 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1e-205

                    1. Initial program 99.3%

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

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

                    Alternative 9: 60.3% accurate, 1.3× speedup?

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

                      1. Initial program 80.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. lower-*.f64N/A

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

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

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

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

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

                          \[\leadsto t \cdot \frac{y}{\mathsf{neg}\left(z\right)} \]
                        2. lift-neg.f6435.9

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

                        \[\leadsto t \cdot \frac{y}{-z} \]

                      if -7.1999999999999999e244 < y

                      1. Initial program 84.9%

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

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

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

                      Alternative 10: 60.3% accurate, 1.4× speedup?

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

                        1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

                          if -1.9e199 < y

                          1. Initial program 85.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 rewrites62.5%

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

                          Alternative 11: 60.0% accurate, 1.4× speedup?

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

                            1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{t \cdot y}{a} \]
                              2. lower-*.f6433.6

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

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

                            if -1.9e199 < y

                            1. Initial program 85.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 rewrites62.5%

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

                            Alternative 12: 52.7% accurate, 1.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (if (<= t -1.8e+111) t (if (<= t 4.8e+92) x t)))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if (t <= -1.8e+111) {
                            		tmp = t;
                            	} else if (t <= 4.8e+92) {
                            		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) :: tmp
                                if (t <= (-1.8d+111)) then
                                    tmp = t
                                else if (t <= 4.8d+92) 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 tmp;
                            	if (t <= -1.8e+111) {
                            		tmp = t;
                            	} else if (t <= 4.8e+92) {
                            		tmp = x;
                            	} else {
                            		tmp = t;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	tmp = 0
                            	if t <= -1.8e+111:
                            		tmp = t
                            	elif t <= 4.8e+92:
                            		tmp = x
                            	else:
                            		tmp = t
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if (t <= -1.8e+111)
                            		tmp = t;
                            	elseif (t <= 4.8e+92)
                            		tmp = x;
                            	else
                            		tmp = t;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	tmp = 0.0;
                            	if (t <= -1.8e+111)
                            		tmp = t;
                            	elseif (t <= 4.8e+92)
                            		tmp = x;
                            	else
                            		tmp = t;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.8e+111], t, If[LessEqual[t, 4.8e+92], x, t]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;t \leq -1.8 \cdot 10^{+111}:\\
                            \;\;\;\;t\\
                            
                            \mathbf{elif}\;t \leq 4.8 \cdot 10^{+92}:\\
                            \;\;\;\;x\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if t < -1.8000000000000001e111 or 4.80000000000000009e92 < t

                              1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

                                \[\leadsto t \]
                              6. Step-by-step derivation
                                1. Applied rewrites29.6%

                                  \[\leadsto t \]

                                if -1.8000000000000001e111 < t < 4.80000000000000009e92

                                1. Initial program 96.4%

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

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

                                Alternative 13: 50.1% 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 84.7%

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

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

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

                                  Reproduce

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