Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 68.2% → 90.8%
Time: 10.6s
Alternatives: 13
Speedup: 0.8×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\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 13 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.8% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999969e-278

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999969e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0

    1. Initial program 5.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
    6. Step-by-step derivation
      1. Applied rewrites23.7%

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

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

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

        if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

        1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 90.8% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-277} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
         (if (or (<= t_1 -1e-277) (not (<= t_1 0.0)))
           (fma (/ (- z t) (- a t)) (- y x) x)
           (fma (- (- y x)) (/ (- z a) t) y))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x + (((y - x) * (z - t)) / (a - t));
      	double tmp;
      	if ((t_1 <= -1e-277) || !(t_1 <= 0.0)) {
      		tmp = fma(((z - t) / (a - t)), (y - x), x);
      	} else {
      		tmp = fma(-(y - x), ((z - a) / t), y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
      	tmp = 0.0
      	if ((t_1 <= -1e-277) || !(t_1 <= 0.0))
      		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
      	else
      		tmp = fma(Float64(-Float64(y - x)), Float64(Float64(z - a) / t), y);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-277], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[((-N[(y - x), $MachinePrecision]) * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-277} \lor \neg \left(t\_1 \leq 0\right):\\
      \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999969e-278 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

        1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

        if -9.99999999999999969e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0

        1. Initial program 5.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{y} \]
        6. Step-by-step derivation
          1. Applied rewrites23.7%

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-277} \lor \neg \left(x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\ \end{array} \]
          6. Add Preprocessing

          Alternative 3: 78.5% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-25} \lor \neg \left(a \leq 5.2 \cdot 10^{-12}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= a -1.8e-25) (not (<= a 5.2e-12)))
             (fma (/ (- z t) (- a t)) y x)
             (fma (- (- y x)) (/ (- z a) t) y)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if ((a <= -1.8e-25) || !(a <= 5.2e-12)) {
          		tmp = fma(((z - t) / (a - t)), y, x);
          	} else {
          		tmp = fma(-(y - x), ((z - a) / t), y);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((a <= -1.8e-25) || !(a <= 5.2e-12))
          		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), y, x);
          	else
          		tmp = fma(Float64(-Float64(y - x)), Float64(Float64(z - a) / t), y);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e-25], N[Not[LessEqual[a, 5.2e-12]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[((-N[(y - x), $MachinePrecision]) * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1.8 \cdot 10^{-25} \lor \neg \left(a \leq 5.2 \cdot 10^{-12}\right):\\
          \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -1.8e-25 or 5.19999999999999965e-12 < a

            1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.8e-25 < a < 5.19999999999999965e-12

              1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{y} \]
              6. Step-by-step derivation
                1. Applied rewrites30.4%

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-25} \lor \neg \left(a \leq 5.2 \cdot 10^{-12}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(y - x\right), \frac{z - a}{t}, y\right)\\ \end{array} \]
                6. Add Preprocessing

                Alternative 4: 75.7% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-26} \lor \neg \left(a \leq 4.8 \cdot 10^{-12}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= a -9e-26) (not (<= a 4.8e-12)))
                   (fma (/ (- z t) (- a t)) y x)
                   (fma (- z) (/ (- y x) t) y)))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((a <= -9e-26) || !(a <= 4.8e-12)) {
                		tmp = fma(((z - t) / (a - t)), y, x);
                	} else {
                		tmp = fma(-z, ((y - x) / t), y);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((a <= -9e-26) || !(a <= 4.8e-12))
                		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), y, x);
                	else
                		tmp = fma(Float64(-z), Float64(Float64(y - x) / t), y);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9e-26], N[Not[LessEqual[a, 4.8e-12]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[((-z) * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;a \leq -9 \cdot 10^{-26} \lor \neg \left(a \leq 4.8 \cdot 10^{-12}\right):\\
                \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < -8.9999999999999998e-26 or 4.79999999999999974e-12 < a

                  1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

                    if -8.9999999999999998e-26 < a < 4.79999999999999974e-12

                    1. Initial program 69.7%

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(-z, \color{blue}{\frac{y - x}{t}}, y\right) \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification78.9%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-26} \lor \neg \left(a \leq 4.8 \cdot 10^{-12}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 5: 73.0% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{-24} \lor \neg \left(a \leq 2.6 \cdot 10^{+53}\right):\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (or (<= a -3.3e-24) (not (<= a 2.6e+53)))
                       (fma (- z t) (/ (- y x) a) x)
                       (fma (- z) (/ (- y x) t) y)))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if ((a <= -3.3e-24) || !(a <= 2.6e+53)) {
                    		tmp = fma((z - t), ((y - x) / a), x);
                    	} else {
                    		tmp = fma(-z, ((y - x) / t), y);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if ((a <= -3.3e-24) || !(a <= 2.6e+53))
                    		tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x);
                    	else
                    		tmp = fma(Float64(-z), Float64(Float64(y - x) / t), y);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.3e-24], N[Not[LessEqual[a, 2.6e+53]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[((-z) * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;a \leq -3.3 \cdot 10^{-24} \lor \neg \left(a \leq 2.6 \cdot 10^{+53}\right):\\
                    \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if a < -3.29999999999999984e-24 or 2.59999999999999998e53 < a

                      1. Initial program 70.2%

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

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

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

                        if -3.29999999999999984e-24 < a < 2.59999999999999998e53

                        1. Initial program 70.9%

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{-24} \lor \neg \left(a \leq 2.6 \cdot 10^{+53}\right):\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 6: 35.4% accurate, 0.8× speedup?

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

                          1. Initial program 51.0%

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

                            \[\leadsto \color{blue}{y} \]
                          4. Step-by-step derivation
                            1. Applied rewrites41.6%

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

                            if -1.79999999999999994e-52 < t < -3.05e-214 or 1.85e-44 < t < 1.3e168

                            1. Initial program 77.0%

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

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

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

                              if -3.05e-214 < t < 1.85e-44

                              1. Initial program 92.0%

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

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

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

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

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

                                Alternative 7: 70.0% accurate, 0.8× speedup?

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

                                  1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -3.29999999999999984e-24 < a < 4.79999999999999997e54

                                    1. Initial program 70.9%

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

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

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

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

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

                                      if 4.79999999999999997e54 < a

                                      1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 8: 58.6% accurate, 0.9× speedup?

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

                                          1. Initial program 76.1%

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

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

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

                                            if -6.7999999999999995e-167 < a < 2.59999999999999998e53

                                            1. Initial program 67.9%

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

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

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

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

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

                                                if 2.59999999999999998e53 < a

                                                1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 9: 57.2% accurate, 0.9× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{-21} \lor \neg \left(t \leq 1.3 \cdot 10^{+168}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a)
                                                   :precision binary64
                                                   (if (or (<= t -1.52e-21) (not (<= t 1.3e+168))) y (fma (/ (- y x) a) z x)))
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	double tmp;
                                                  	if ((t <= -1.52e-21) || !(t <= 1.3e+168)) {
                                                  		tmp = y;
                                                  	} else {
                                                  		tmp = fma(((y - x) / a), z, x);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a)
                                                  	tmp = 0.0
                                                  	if ((t <= -1.52e-21) || !(t <= 1.3e+168))
                                                  		tmp = y;
                                                  	else
                                                  		tmp = fma(Float64(Float64(y - x) / a), z, x);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.52e-21], N[Not[LessEqual[t, 1.3e+168]], $MachinePrecision]], y, N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;t \leq -1.52 \cdot 10^{-21} \lor \neg \left(t \leq 1.3 \cdot 10^{+168}\right):\\
                                                  \;\;\;\;y\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if t < -1.52000000000000009e-21 or 1.3e168 < t

                                                    1. Initial program 47.5%

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

                                                      \[\leadsto \color{blue}{y} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites43.4%

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

                                                      if -1.52000000000000009e-21 < t < 1.3e168

                                                      1. Initial program 83.7%

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

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

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)} \]
                                                      5. Recombined 2 regimes into one program.
                                                      6. Final simplification58.2%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{-21} \lor \neg \left(t \leq 1.3 \cdot 10^{+168}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\ \end{array} \]
                                                      7. Add Preprocessing

                                                      Alternative 10: 51.0% accurate, 1.0× speedup?

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

                                                        1. Initial program 47.5%

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

                                                          \[\leadsto \color{blue}{y} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites43.4%

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

                                                          if -1.52000000000000009e-21 < t < 1.45e170

                                                          1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 11: 50.0% accurate, 1.0× speedup?

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

                                                              1. Initial program 47.5%

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

                                                                \[\leadsto \color{blue}{y} \]
                                                              4. Step-by-step derivation
                                                                1. Applied rewrites43.4%

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

                                                                if -1.52000000000000009e-21 < t < 1.45e170

                                                                1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(z, \frac{y}{a}, x\right) \]
                                                                  4. Recombined 2 regimes into one program.
                                                                  5. Final simplification49.5%

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

                                                                  Alternative 12: 37.0% accurate, 2.2× speedup?

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

                                                                    1. Initial program 51.0%

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

                                                                      \[\leadsto \color{blue}{y} \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites41.6%

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

                                                                      if -1.79999999999999994e-52 < t < 1.3e168

                                                                      1. Initial program 84.1%

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

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

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

                                                                      Alternative 13: 24.8% accurate, 29.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 70.5%

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

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

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

                                                                        Developer Target 1: 87.3% accurate, 0.6× speedup?

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

                                                                        Reproduce

                                                                        ?
                                                                        herbie shell --seed 2025019 
                                                                        (FPCore (x y z t a)
                                                                          :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                                          :precision binary64
                                                                        
                                                                          :alt
                                                                          (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                                                        
                                                                          (+ x (/ (* (- y x) (- z t)) (- a t))))