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

Percentage Accurate: 85.2% → 98.4%
Time: 3.4s
Alternatives: 11
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}

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

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

Initial Program: 85.2% 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.4% 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 85.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 x + \frac{\color{blue}{t \cdot \left(y - z\right)}}{a - z} \]
    7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

Alternative 2: 81.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 200:\\ \;\;\;\;x + \frac{y \cdot t}{a - z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+131}:\\ \;\;\;\;\left(x + t\right) - \frac{t \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))) (t_2 (/ (* (- y z) t) (- a z))))
   (if (<= t_2 -2e+171)
     t_1
     (if (<= t_2 200.0)
       (+ x (/ (* y t) (- a z)))
       (if (<= t_2 5e+131) (- (+ x t) (/ (* t y) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = ((y - z) * t) / (a - z);
	double tmp;
	if (t_2 <= -2e+171) {
		tmp = t_1;
	} else if (t_2 <= 200.0) {
		tmp = x + ((y * t) / (a - z));
	} else if (t_2 <= 5e+131) {
		tmp = (x + t) - ((t * y) / 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) :: t_2
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    t_2 = ((y - z) * t) / (a - z)
    if (t_2 <= (-2d+171)) then
        tmp = t_1
    else if (t_2 <= 200.0d0) then
        tmp = x + ((y * t) / (a - z))
    else if (t_2 <= 5d+131) then
        tmp = (x + t) - ((t * y) / z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = ((y - z) * t) / (a - z);
	double tmp;
	if (t_2 <= -2e+171) {
		tmp = t_1;
	} else if (t_2 <= 200.0) {
		tmp = x + ((y * t) / (a - z));
	} else if (t_2 <= 5e+131) {
		tmp = (x + t) - ((t * y) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	t_2 = ((y - z) * t) / (a - z)
	tmp = 0
	if t_2 <= -2e+171:
		tmp = t_1
	elif t_2 <= 200.0:
		tmp = x + ((y * t) / (a - z))
	elif t_2 <= 5e+131:
		tmp = (x + t) - ((t * y) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
	tmp = 0.0
	if (t_2 <= -2e+171)
		tmp = t_1;
	elseif (t_2 <= 200.0)
		tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z)));
	elseif (t_2 <= 5e+131)
		tmp = Float64(Float64(x + t) - Float64(Float64(t * y) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	t_2 = ((y - z) * t) / (a - z);
	tmp = 0.0;
	if (t_2 <= -2e+171)
		tmp = t_1;
	elseif (t_2 <= 200.0)
		tmp = x + ((y * t) / (a - z));
	elseif (t_2 <= 5e+131)
		tmp = (x + t) - ((t * y) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+171], t$95$1, If[LessEqual[t$95$2, 200.0], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+131], N[(N[(x + t), $MachinePrecision] - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 200:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;\left(x + t\right) - \frac{t \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -1.99999999999999991e171 or 4.99999999999999995e131 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 55.4%

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

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

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

    if -1.99999999999999991e171 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 200

    1. Initial program 99.6%

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

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

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

      if 200 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.99999999999999995e131

      1. Initial program 99.8%

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

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

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

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

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

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

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

          \[\leadsto \left(t + x\right) + \left(-\frac{t \cdot y - a \cdot t}{z}\right) \]
        7. fp-cancel-sub-sign-invN/A

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

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

          \[\leadsto \left(t + x\right) + \left(-\frac{\mathsf{fma}\left(t, y, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)}{z}\right) \]
        10. lower-neg.f6457.6

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

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

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

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

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

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

          \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
        5. lower-*.f6458.7

          \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
      8. Applied rewrites58.7%

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

    Alternative 3: 81.2% accurate, 0.2× speedup?

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

      1. Initial program 55.4%

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

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

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

      if -1.99999999999999991e171 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 200

      1. Initial program 99.6%

        \[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--.f6498.9

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

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

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

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

        if 200 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.99999999999999995e131

        1. Initial program 99.8%

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

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

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

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

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

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

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

            \[\leadsto \left(t + x\right) + \left(-\frac{t \cdot y - a \cdot t}{z}\right) \]
          7. fp-cancel-sub-sign-invN/A

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

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

            \[\leadsto \left(t + x\right) + \left(-\frac{\mathsf{fma}\left(t, y, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)}{z}\right) \]
          10. lower-neg.f6457.6

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

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

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

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

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

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

            \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
          5. lower-*.f6458.7

            \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
        8. Applied rewrites58.7%

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

      Alternative 4: 55.2% accurate, 0.5× speedup?

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

        1. Initial program 57.4%

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

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

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

            \[\leadsto t \]

          if -9.99999999999999899e164 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.9999999999999998e106

          1. Initial program 99.6%

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

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

          Alternative 5: 84.3% accurate, 0.7× speedup?

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

            1. Initial program 66.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 rewrites85.8%

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

              if -1.8e137 < z < 5.0000000000000001e84

              1. Initial program 93.7%

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

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

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

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

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

                if 5.0000000000000001e84 < z

                1. Initial program 68.2%

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

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

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

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

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

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

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

                    \[\leadsto \left(t + x\right) + \left(-\frac{t \cdot y - a \cdot t}{z}\right) \]
                  7. fp-cancel-sub-sign-invN/A

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

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

                    \[\leadsto \left(t + x\right) + \left(-\frac{\mathsf{fma}\left(t, y, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)}{z}\right) \]
                  10. lower-neg.f6478.3

                    \[\leadsto \left(t + x\right) + \left(-\frac{\mathsf{fma}\left(t, y, \left(-a\right) \cdot t\right)}{z}\right) \]
                5. Applied rewrites78.3%

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

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

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

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

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

                    \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
                  5. lower-*.f6482.7

                    \[\leadsto \left(x + t\right) - \frac{t \cdot y}{z} \]
                8. Applied rewrites82.7%

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

              Alternative 6: 84.3% accurate, 0.8× speedup?

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

                1. Initial program 67.3%

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

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

                  if -1.8e137 < z < 2.5999999999999998e86

                  1. Initial program 93.6%

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

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

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

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

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

                  Alternative 7: 77.2% accurate, 0.8× speedup?

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

                    1. Initial program 71.4%

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

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

                      if -2.14999999999999992e130 < z < 7.5e8

                      1. Initial program 94.3%

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

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

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

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

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

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

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

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

                    Alternative 8: 77.0% accurate, 0.9× speedup?

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

                      1. Initial program 73.7%

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

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

                        if -1.10000000000000004e23 < z < 7.5e8

                        1. Initial program 95.9%

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

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

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

                      Alternative 9: 61.6% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-76}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 86000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (<= z -2.8e-76)
                         (+ x t)
                         (if (<= z -5.2e-222) (* t (/ y a)) (if (<= z 86000000.0) x (+ x t)))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (z <= -2.8e-76) {
                      		tmp = x + t;
                      	} else if (z <= -5.2e-222) {
                      		tmp = t * (y / a);
                      	} else if (z <= 86000000.0) {
                      		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 (z <= (-2.8d-76)) then
                              tmp = x + t
                          else if (z <= (-5.2d-222)) then
                              tmp = t * (y / a)
                          else if (z <= 86000000.0d0) 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 (z <= -2.8e-76) {
                      		tmp = x + t;
                      	} else if (z <= -5.2e-222) {
                      		tmp = t * (y / a);
                      	} else if (z <= 86000000.0) {
                      		tmp = x;
                      	} else {
                      		tmp = x + t;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a):
                      	tmp = 0
                      	if z <= -2.8e-76:
                      		tmp = x + t
                      	elif z <= -5.2e-222:
                      		tmp = t * (y / a)
                      	elif z <= 86000000.0:
                      		tmp = x
                      	else:
                      		tmp = x + t
                      	return tmp
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if (z <= -2.8e-76)
                      		tmp = Float64(x + t);
                      	elseif (z <= -5.2e-222)
                      		tmp = Float64(t * Float64(y / a));
                      	elseif (z <= 86000000.0)
                      		tmp = x;
                      	else
                      		tmp = Float64(x + t);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a)
                      	tmp = 0.0;
                      	if (z <= -2.8e-76)
                      		tmp = x + t;
                      	elseif (z <= -5.2e-222)
                      		tmp = t * (y / a);
                      	elseif (z <= 86000000.0)
                      		tmp = x;
                      	else
                      		tmp = x + t;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e-76], N[(x + t), $MachinePrecision], If[LessEqual[z, -5.2e-222], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 86000000.0], x, N[(x + t), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \leq -2.8 \cdot 10^{-76}:\\
                      \;\;\;\;x + t\\
                      
                      \mathbf{elif}\;z \leq -5.2 \cdot 10^{-222}:\\
                      \;\;\;\;t \cdot \frac{y}{a}\\
                      
                      \mathbf{elif}\;z \leq 86000000:\\
                      \;\;\;\;x\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x + t\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -2.8000000000000001e-76 or 8.6e7 < z

                        1. Initial program 76.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 rewrites74.8%

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

                          if -2.8000000000000001e-76 < z < -5.1999999999999997e-222

                          1. Initial program 95.0%

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

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

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

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

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

                              \[\leadsto t \cdot \frac{y}{a - \color{blue}{z}} \]
                          5. Applied rewrites40.2%

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

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

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

                            if -5.1999999999999997e-222 < z < 8.6e7

                            1. Initial program 95.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 rewrites50.7%

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

                            Alternative 10: 63.8% accurate, 1.6× speedup?

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

                              1. Initial program 80.5%

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

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

                                if -8.4999999999999995e82 < a < 2.00000000000000003e184

                                1. Initial program 87.0%

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

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

                                Alternative 11: 50.2% 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 85.2%

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

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

                                  Developer Target 1: 99.2% 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 2025091 
                                  (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))))