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

Percentage Accurate: 98.3% → 98.3%
Time: 6.2s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Alternative 1: 98.3% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 0.4:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(z - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e16

    1. Initial program 94.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

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

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

      if -5e16 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.40000000000000002

      1. Initial program 98.8%

        \[x + y \cdot \frac{z - t}{z - a} \]
      2. Add Preprocessing
      3. Taylor expanded in a around inf

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

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

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

          if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 z a))

          1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 86.6% accurate, 0.4× speedup?

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

            1. Initial program 94.9%

              \[x + y \cdot \frac{z - t}{z - a} \]
            2. Add Preprocessing
            3. Taylor expanded in t around inf

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

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

              if -5e16 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.40000000000000002

              1. Initial program 98.8%

                \[x + y \cdot \frac{z - t}{z - a} \]
              2. Add Preprocessing
              3. Taylor expanded in a around inf

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

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

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

                  if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 z a))

                  1. Initial program 98.4%

                    \[x + y \cdot \frac{z - t}{z - a} \]
                  2. Add Preprocessing
                  3. Taylor expanded in a around 0

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

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

                  Alternative 4: 81.7% accurate, 0.4× speedup?

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

                    1. Initial program 97.3%

                      \[x + y \cdot \frac{z - t}{z - a} \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around 0

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

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

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

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

                        if 4.99999999999999963e-105 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.40000000000000002

                        1. Initial program 99.7%

                          \[x + y \cdot \frac{z - t}{z - a} \]
                        2. Add Preprocessing
                        3. Taylor expanded in t around 0

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

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

                          if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 z a))

                          1. Initial program 98.4%

                            \[x + y \cdot \frac{z - t}{z - a} \]
                          2. Add Preprocessing
                          3. Taylor expanded in a around 0

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

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

                          Alternative 5: 81.6% accurate, 0.4× speedup?

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

                            1. Initial program 97.3%

                              \[x + y \cdot \frac{z - t}{z - a} \]
                            2. Add Preprocessing
                            3. Taylor expanded in t around 0

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

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

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

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

                                if 4.99999999999999963e-105 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1

                                1. Initial program 99.9%

                                  \[x + y \cdot \frac{z - t}{z - a} \]
                                2. Add Preprocessing
                                3. Taylor expanded in t around 0

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

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

                                  if 1 < (/.f64 (-.f64 z t) (-.f64 z a))

                                  1. Initial program 94.3%

                                    \[x + y \cdot \frac{z - t}{z - a} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around 0

                                    \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites71.2%

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

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

                                    Alternative 6: 81.0% accurate, 0.4× speedup?

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

                                      1. Initial program 97.7%

                                        \[x + y \cdot \frac{z - t}{z - a} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in t around 0

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

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

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

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

                                          if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1

                                          1. Initial program 100.0%

                                            \[x + y \cdot \frac{z - t}{z - a} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in t around 0

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

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

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

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

                                              if 1 < (/.f64 (-.f64 z t) (-.f64 z a))

                                              1. Initial program 94.3%

                                                \[x + y \cdot \frac{z - t}{z - a} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in a around 0

                                                \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites71.2%

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

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

                                                Alternative 7: 80.4% accurate, 0.4× speedup?

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

                                                  1. Initial program 97.7%

                                                    \[x + y \cdot \frac{z - t}{z - a} \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in t around 0

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

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

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

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

                                                      if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1

                                                      1. Initial program 100.0%

                                                        \[x + y \cdot \frac{z - t}{z - a} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in t around 0

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

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

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

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

                                                          if 1 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                          1. Initial program 94.3%

                                                            \[x + y \cdot \frac{z - t}{z - a} \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in a around 0

                                                            \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites71.2%

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

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

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

                                                            Alternative 8: 80.3% accurate, 0.4× speedup?

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

                                                              1. Initial program 97.6%

                                                                \[x + y \cdot \frac{z - t}{z - a} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in t around 0

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

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

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

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

                                                                  if 4.9999999999999999e-13 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1

                                                                  1. Initial program 100.0%

                                                                    \[x + y \cdot \frac{z - t}{z - a} \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in z around inf

                                                                    \[\leadsto x + \color{blue}{y} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites97.2%

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

                                                                    if 1 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                    1. Initial program 94.3%

                                                                      \[x + y \cdot \frac{z - t}{z - a} \]
                                                                    2. Add Preprocessing
                                                                    3. Taylor expanded in a around 0

                                                                      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites71.2%

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

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

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

                                                                      Alternative 9: 78.7% accurate, 0.4× speedup?

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

                                                                        1. Initial program 97.6%

                                                                          \[x + y \cdot \frac{z - t}{z - a} \]
                                                                        2. Add Preprocessing
                                                                        3. Taylor expanded in t around 0

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

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

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

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

                                                                            if 4.9999999999999999e-13 < (/.f64 (-.f64 z t) (-.f64 z a)) < 4.9999999999999998e106

                                                                            1. Initial program 100.0%

                                                                              \[x + y \cdot \frac{z - t}{z - a} \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in z around inf

                                                                              \[\leadsto x + \color{blue}{y} \]
                                                                            4. Step-by-step derivation
                                                                              1. Applied rewrites90.9%

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

                                                                              if 4.9999999999999998e106 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                              1. Initial program 88.0%

                                                                                \[x + y \cdot \frac{z - t}{z - a} \]
                                                                              2. Add Preprocessing
                                                                              3. Taylor expanded in a around 0

                                                                                \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                                                              4. Step-by-step derivation
                                                                                1. Applied rewrites63.0%

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

                                                                                  \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites51.2%

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

                                                                                Alternative 10: 69.6% accurate, 0.5× speedup?

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

                                                                                  1. Initial program 93.4%

                                                                                    \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in a around inf

                                                                                    \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites72.0%

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

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

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

                                                                                      if -4.99999999999999961e80 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e-59

                                                                                      1. Initial program 98.8%

                                                                                        \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                      2. Add Preprocessing
                                                                                      3. Taylor expanded in x around inf

                                                                                        \[\leadsto \color{blue}{x} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites68.5%

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

                                                                                        if 1e-59 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                                        1. Initial program 98.5%

                                                                                          \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in z around inf

                                                                                          \[\leadsto x + \color{blue}{y} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. Applied rewrites80.8%

                                                                                            \[\leadsto x + \color{blue}{y} \]
                                                                                        5. Recombined 3 regimes into one program.
                                                                                        6. Add Preprocessing

                                                                                        Alternative 11: 69.5% accurate, 0.5× speedup?

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

                                                                                          1. Initial program 93.4%

                                                                                            \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in a around inf

                                                                                            \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites72.0%

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

                                                                                              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot z}{a}} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites5.8%

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

                                                                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites57.0%

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

                                                                                                if -4.99999999999999961e80 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e-59

                                                                                                1. Initial program 98.8%

                                                                                                  \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in x around inf

                                                                                                  \[\leadsto \color{blue}{x} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. Applied rewrites68.5%

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

                                                                                                  if 1e-59 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                                                  1. Initial program 98.5%

                                                                                                    \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Taylor expanded in z around inf

                                                                                                    \[\leadsto x + \color{blue}{y} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites80.8%

                                                                                                      \[\leadsto x + \color{blue}{y} \]
                                                                                                  5. Recombined 3 regimes into one program.
                                                                                                  6. Add Preprocessing

                                                                                                  Alternative 12: 76.3% accurate, 0.6× speedup?

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

                                                                                                    1. Initial program 97.6%

                                                                                                      \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Taylor expanded in t around 0

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

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

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

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

                                                                                                        if 4.9999999999999999e-13 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                                                        1. Initial program 98.4%

                                                                                                          \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Taylor expanded in z around inf

                                                                                                          \[\leadsto x + \color{blue}{y} \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. Applied rewrites82.2%

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

                                                                                                        Alternative 13: 67.0% accurate, 1.0× speedup?

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

                                                                                                          1. Initial program 97.5%

                                                                                                            \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                          2. Add Preprocessing
                                                                                                          3. Taylor expanded in x around inf

                                                                                                            \[\leadsto \color{blue}{x} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites57.0%

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

                                                                                                            if 1e-59 < (/.f64 (-.f64 z t) (-.f64 z a))

                                                                                                            1. Initial program 98.5%

                                                                                                              \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in z around inf

                                                                                                              \[\leadsto x + \color{blue}{y} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. Applied rewrites80.8%

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

                                                                                                            Alternative 14: 98.3% accurate, 1.0× speedup?

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

                                                                                                              \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Add Preprocessing

                                                                                                            Alternative 15: 54.2% accurate, 2.0× speedup?

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

                                                                                                              1. Initial program 98.4%

                                                                                                                \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                              2. Add Preprocessing
                                                                                                              3. Taylor expanded in x around inf

                                                                                                                \[\leadsto \color{blue}{x} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. Applied rewrites67.2%

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

                                                                                                                if -9.20000000000000011e-150 < x < 3.5000000000000002e-177

                                                                                                                1. Initial program 96.9%

                                                                                                                  \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in a around 0

                                                                                                                  \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. Applied rewrites53.5%

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

                                                                                                                    \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{z}} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites51.1%

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

                                                                                                                      \[\leadsto y \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites37.7%

                                                                                                                        \[\leadsto y \]
                                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                                    5. Final simplification59.7%

                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-150} \lor \neg \left(x \leq 3.5 \cdot 10^{-177}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
                                                                                                                    6. Add Preprocessing

                                                                                                                    Alternative 16: 51.1% accurate, 26.0× 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 98.0%

                                                                                                                      \[x + y \cdot \frac{z - t}{z - a} \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Taylor expanded in x around inf

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

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

                                                                                                                      Developer Target 1: 98.3% accurate, 0.8× speedup?

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

                                                                                                                      Reproduce

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