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

Percentage Accurate: 86.6% → 98.2%
Time: 4.1s
Alternatives: 13
Speedup: 1.1×

Specification

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

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

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

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

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: 86.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 98.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-102} \lor \neg \left(x \leq 9.5 \cdot 10^{-103}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a - z}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.36000000000000001e-102 or 9.50000000000000065e-103 < x

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.36000000000000001e-102 < x < 9.50000000000000065e-103

      1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification85.0%

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

    Alternative 3: 81.2% accurate, 0.7× speedup?

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

      1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.45e-130 < x < 1.70000000000000006e-102

        1. Initial program 90.8%

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification85.0%

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

      Alternative 4: 87.1% accurate, 0.7× speedup?

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

        1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(z\right)}{a - z}, t, x\right) \]
          2. lower-neg.f6488.4

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

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

        if -1.54999999999999995e-30 < z < 9.5e11

        1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.5e11 < z

          1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 87.4% accurate, 0.7× speedup?

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

          1. Initial program 90.1%

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

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

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

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

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

              \[\leadsto x + t \cdot \frac{y}{a - \color{blue}{z}} \]
          5. Applied rewrites85.6%

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

          if -1.3e41 < y < 2.45000000000000015e-28

          1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(z\right)}{a - z}, t, x\right) \]
            2. lower-neg.f6490.2

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

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

          if 2.45000000000000015e-28 < y

          1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 81.0% accurate, 0.7× speedup?

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

            1. Initial program 84.9%

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

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

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

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

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

                \[\leadsto x + t \cdot \frac{y}{a - \color{blue}{z}} \]
            5. Applied rewrites88.0%

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

            if -5.10000000000000005e-132 < x < 1.70000000000000006e-102

            1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

            if 1.70000000000000006e-102 < x

            1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 78.9% accurate, 0.8× speedup?

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

              1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.00000000000000019e-26 < y < 1.25000000000000011e-87

                1. Initial program 89.8%

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

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

                    \[\leadsto x + \color{blue}{t} \]
                5. Recombined 2 regimes into one program.
                6. Final simplification84.1%

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

                Alternative 8: 76.5% accurate, 0.9× speedup?

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

                  1. Initial program 82.5%

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

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

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

                    if -1.00000000000000004e-42 < z < 3e9

                    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{t}{a}}, x\right) \]
                      3. Step-by-step derivation
                        1. lower-/.f6482.1

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

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

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

                    Alternative 9: 76.6% accurate, 0.9× speedup?

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

                      1. Initial program 82.5%

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

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

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

                        if -1.00000000000000004e-42 < z < 3e9

                        1. Initial program 96.0%

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

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

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

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

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

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

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

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

                      Alternative 10: 95.7% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 53.2% accurate, 2.0× speedup?

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

                        1. Initial program 86.9%

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

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

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

                          if -2.64999999999999998e-148 < x < 4.5999999999999996e-90

                          1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

                            \[\leadsto t \]
                          7. Step-by-step derivation
                            1. Applied rewrites34.8%

                              \[\leadsto t \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification57.7%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.65 \cdot 10^{-148}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-90}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 12: 60.8% accurate, 2.6× speedup?

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

                            1. Initial program 78.4%

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

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

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

                              if -7.80000000000000022e152 < a

                              1. Initial program 90.1%

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

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

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

                              Alternative 13: 50.8% accurate, 26.0× speedup?

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

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

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

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

                                Developer Target 1: 99.4% accurate, 0.7× speedup?

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

                                Reproduce

                                ?
                                herbie shell --seed 2025051 
                                (FPCore (x y z t a)
                                  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
                                  :precision binary64
                                
                                  :alt
                                  (! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))
                                
                                  (+ x (/ (* (- y z) t) (- a z))))