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

Percentage Accurate: 85.7% → 98.4%
Time: 4.0s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
(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]
x + \frac{\left(y - z\right) \cdot t}{a - z}

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 12 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.7% accurate, 1.0× speedup?

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

Alternative 1: 98.4% accurate, 1.0× speedup?

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

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((z - y) / (z - a)) * t)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((z - y) / (z - a)) * t);
}
def code(x, y, z, t, a):
	return x + (((z - y) / (z - a)) * t)
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(z - y) / Float64(z - a)) * t))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((z - y) / (z - a)) * t);
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
x + \frac{z - y}{z - a} \cdot t
Derivation
  1. Initial program 85.7%

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    4. mult-flip-revN/A

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

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

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

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

      \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot t \]
    9. sub-negate-revN/A

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

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

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

      \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot t \]
    13. sub-negate-revN/A

      \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot t \]
    14. lower--.f6498.4%

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

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

Alternative 2: 84.5% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+117}:\\ \;\;\;\;\frac{z - y}{z - a} \cdot t\\ \mathbf{elif}\;t\_1 \leq 10^{+147}:\\ \;\;\;\;x + \frac{z}{z - a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (/ (* (- y z) t) (- a z))))
  (if (<= t_1 -2e+117)
    (* (/ (- z y) (- z a)) t)
    (if (<= t_1 1e+147)
      (+ x (* (/ z (- z a)) t))
      (* (/ t (- a z)) (- y z))))))
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 <= -2e+117) {
		tmp = ((z - y) / (z - a)) * t;
	} else if (t_1 <= 1e+147) {
		tmp = x + ((z / (z - a)) * t);
	} else {
		tmp = (t / (a - z)) * (y - z);
	}
	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 <= (-2d+117)) then
        tmp = ((z - y) / (z - a)) * t
    else if (t_1 <= 1d+147) then
        tmp = x + ((z / (z - a)) * t)
    else
        tmp = (t / (a - z)) * (y - z)
    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 <= -2e+117) {
		tmp = ((z - y) / (z - a)) * t;
	} else if (t_1 <= 1e+147) {
		tmp = x + ((z / (z - a)) * t);
	} else {
		tmp = (t / (a - z)) * (y - z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y - z) * t) / (a - z)
	tmp = 0
	if t_1 <= -2e+117:
		tmp = ((z - y) / (z - a)) * t
	elif t_1 <= 1e+147:
		tmp = x + ((z / (z - a)) * t)
	else:
		tmp = (t / (a - z)) * (y - z)
	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 <= -2e+117)
		tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t);
	elseif (t_1 <= 1e+147)
		tmp = Float64(x + Float64(Float64(z / Float64(z - a)) * t));
	else
		tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z));
	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 <= -2e+117)
		tmp = ((z - y) / (z - a)) * t;
	elseif (t_1 <= 1e+147)
		tmp = x + ((z / (z - a)) * t);
	else
		tmp = (t / (a - z)) * (y - z);
	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, -2e+117], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 1e+147], N[(x + N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+117}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\

\mathbf{elif}\;t\_1 \leq 10^{+147}:\\
\;\;\;\;x + \frac{z}{z - a} \cdot t\\

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


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

    1. Initial program 85.7%

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

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

        \[\leadsto x + \color{blue}{t} \]
      2. Taylor expanded in x around 0

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

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

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

          \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
        4. lower--.f6439.3%

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

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

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

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

          \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
        4. *-commutativeN/A

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

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

          \[\leadsto \frac{y - z}{a - z} \cdot t \]
        7. sub-negate-revN/A

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

          \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{a - z} \cdot t \]
        9. sub-negate-revN/A

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

          \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot t \]
        11. frac-2negN/A

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

          \[\leadsto \frac{z - y}{z - a} \cdot t \]
        13. lower--.f6449.2%

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

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

      if -2.0000000000000001e117 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.9999999999999998e146

      1. Initial program 85.7%

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

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

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

          \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
        4. mult-flip-revN/A

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

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

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

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

          \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot t \]
        9. sub-negate-revN/A

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

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

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

          \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot t \]
        13. sub-negate-revN/A

          \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot t \]
        14. lower--.f6498.4%

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

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

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

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

        if 9.9999999999999998e146 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

        1. Initial program 85.7%

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

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

            \[\leadsto x + \color{blue}{t} \]
          2. Taylor expanded in x around 0

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

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

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

              \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
            4. lower--.f6439.3%

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 82.1% accurate, 0.7× speedup?

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

          1. Initial program 85.7%

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

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

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

              \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
            4. mult-flip-revN/A

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

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

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

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

              \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot t \]
            9. sub-negate-revN/A

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

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

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

              \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot t \]
            13. sub-negate-revN/A

              \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot t \]
            14. lower--.f6498.4%

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

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

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

              \[\leadsto x + \frac{z - y}{\color{blue}{z}} \cdot t \]
            2. lower--.f6468.0%

              \[\leadsto x + \frac{z - y}{z} \cdot t \]
          6. Applied rewrites68.0%

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

          if -2.55e-126 < z < 1e-51

          1. Initial program 85.7%

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

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

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

              \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
            4. mult-flip-revN/A

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

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

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

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

              \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot t \]
            9. sub-negate-revN/A

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

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

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

              \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot t \]
            13. sub-negate-revN/A

              \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot t \]
            14. lower--.f6498.4%

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

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

            \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot t \]
          5. Step-by-step derivation
            1. lower-/.f6461.8%

              \[\leadsto x + \frac{y}{\color{blue}{a}} \cdot t \]
          6. Applied rewrites61.8%

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

        Alternative 4: 78.5% accurate, 0.2× speedup?

        \[\begin{array}{l} t_1 := \frac{z - y}{z - a} \cdot t\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\ \;\;\;\;x \cdot 1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+58}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
        (FPCore (x y z t a)
          :precision binary64
          (let* ((t_1 (* (/ (- z y) (- z a)) t))
               (t_2 (/ (* (- y z) t) (- a z))))
          (if (<= t_2 -2e-51)
            t_1
            (if (<= t_2 2e-220) (* x 1.0) (if (<= t_2 5e+58) (+ x t) t_1)))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = ((z - y) / (z - a)) * t;
        	double t_2 = ((y - z) * t) / (a - z);
        	double tmp;
        	if (t_2 <= -2e-51) {
        		tmp = t_1;
        	} else if (t_2 <= 2e-220) {
        		tmp = x * 1.0;
        	} else if (t_2 <= 5e+58) {
        		tmp = x + t;
        	} 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 = ((z - y) / (z - a)) * t
            t_2 = ((y - z) * t) / (a - z)
            if (t_2 <= (-2d-51)) then
                tmp = t_1
            else if (t_2 <= 2d-220) then
                tmp = x * 1.0d0
            else if (t_2 <= 5d+58) then
                tmp = x + t
            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 = ((z - y) / (z - a)) * t;
        	double t_2 = ((y - z) * t) / (a - z);
        	double tmp;
        	if (t_2 <= -2e-51) {
        		tmp = t_1;
        	} else if (t_2 <= 2e-220) {
        		tmp = x * 1.0;
        	} else if (t_2 <= 5e+58) {
        		tmp = x + t;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = ((z - y) / (z - a)) * t
        	t_2 = ((y - z) * t) / (a - z)
        	tmp = 0
        	if t_2 <= -2e-51:
        		tmp = t_1
        	elif t_2 <= 2e-220:
        		tmp = x * 1.0
        	elif t_2 <= 5e+58:
        		tmp = x + t
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(Float64(Float64(z - y) / Float64(z - a)) * t)
        	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
        	tmp = 0.0
        	if (t_2 <= -2e-51)
        		tmp = t_1;
        	elseif (t_2 <= 2e-220)
        		tmp = Float64(x * 1.0);
        	elseif (t_2 <= 5e+58)
        		tmp = Float64(x + t);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = ((z - y) / (z - a)) * t;
        	t_2 = ((y - z) * t) / (a - z);
        	tmp = 0.0;
        	if (t_2 <= -2e-51)
        		tmp = t_1;
        	elseif (t_2 <= 2e-220)
        		tmp = x * 1.0;
        	elseif (t_2 <= 5e+58)
        		tmp = x + t;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-51], t$95$1, If[LessEqual[t$95$2, 2e-220], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+58], N[(x + t), $MachinePrecision], t$95$1]]]]]
        
        \begin{array}{l}
        t_1 := \frac{z - y}{z - a} \cdot t\\
        t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
        \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-51}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\
        \;\;\;\;x \cdot 1\\
        
        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+58}:\\
        \;\;\;\;x + t\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -2e-51 or 4.9999999999999999e58 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

          1. Initial program 85.7%

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

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

              \[\leadsto x + \color{blue}{t} \]
            2. Taylor expanded in x around 0

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

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

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

                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
              4. lower--.f6439.3%

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

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

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

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

                \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
              4. *-commutativeN/A

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

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

                \[\leadsto \frac{y - z}{a - z} \cdot t \]
              7. sub-negate-revN/A

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

                \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{a - z} \cdot t \]
              9. sub-negate-revN/A

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

                \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot t \]
              11. frac-2negN/A

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

                \[\leadsto \frac{z - y}{z - a} \cdot t \]
              13. lower--.f6449.2%

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

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

            if -2e-51 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e-220

            1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x \cdot 1 \]
            6. Step-by-step derivation
              1. Applied rewrites51.1%

                \[\leadsto x \cdot 1 \]

              if 2e-220 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.9999999999999999e58

              1. Initial program 85.7%

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

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

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

              Alternative 5: 78.1% accurate, 0.2× speedup?

              \[\begin{array}{l} t_1 := \frac{t}{a - z} \cdot \left(y - z\right)\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\ \;\;\;\;x \cdot 1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+58}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a)
                :precision binary64
                (let* ((t_1 (* (/ t (- a z)) (- y z)))
                     (t_2 (/ (* (- y z) t) (- a z))))
                (if (<= t_2 -5e-13)
                  t_1
                  (if (<= t_2 2e-220) (* x 1.0) (if (<= t_2 5e+58) (+ x t) t_1)))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = (t / (a - z)) * (y - z);
              	double t_2 = ((y - z) * t) / (a - z);
              	double tmp;
              	if (t_2 <= -5e-13) {
              		tmp = t_1;
              	} else if (t_2 <= 2e-220) {
              		tmp = x * 1.0;
              	} else if (t_2 <= 5e+58) {
              		tmp = x + t;
              	} 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 = (t / (a - z)) * (y - z)
                  t_2 = ((y - z) * t) / (a - z)
                  if (t_2 <= (-5d-13)) then
                      tmp = t_1
                  else if (t_2 <= 2d-220) then
                      tmp = x * 1.0d0
                  else if (t_2 <= 5d+58) then
                      tmp = x + t
                  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 = (t / (a - z)) * (y - z);
              	double t_2 = ((y - z) * t) / (a - z);
              	double tmp;
              	if (t_2 <= -5e-13) {
              		tmp = t_1;
              	} else if (t_2 <= 2e-220) {
              		tmp = x * 1.0;
              	} else if (t_2 <= 5e+58) {
              		tmp = x + t;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	t_1 = (t / (a - z)) * (y - z)
              	t_2 = ((y - z) * t) / (a - z)
              	tmp = 0
              	if t_2 <= -5e-13:
              		tmp = t_1
              	elif t_2 <= 2e-220:
              		tmp = x * 1.0
              	elif t_2 <= 5e+58:
              		tmp = x + t
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a)
              	t_1 = Float64(Float64(t / Float64(a - z)) * Float64(y - z))
              	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
              	tmp = 0.0
              	if (t_2 <= -5e-13)
              		tmp = t_1;
              	elseif (t_2 <= 2e-220)
              		tmp = Float64(x * 1.0);
              	elseif (t_2 <= 5e+58)
              		tmp = Float64(x + t);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	t_1 = (t / (a - z)) * (y - z);
              	t_2 = ((y - z) * t) / (a - z);
              	tmp = 0.0;
              	if (t_2 <= -5e-13)
              		tmp = t_1;
              	elseif (t_2 <= 2e-220)
              		tmp = x * 1.0;
              	elseif (t_2 <= 5e+58)
              		tmp = x + t;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-13], t$95$1, If[LessEqual[t$95$2, 2e-220], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+58], N[(x + t), $MachinePrecision], t$95$1]]]]]
              
              \begin{array}{l}
              t_1 := \frac{t}{a - z} \cdot \left(y - z\right)\\
              t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-13}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\
              \;\;\;\;x \cdot 1\\
              
              \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+58}:\\
              \;\;\;\;x + t\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -4.9999999999999999e-13 or 4.9999999999999999e58 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                1. Initial program 85.7%

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

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

                    \[\leadsto x + \color{blue}{t} \]
                  2. Taylor expanded in x around 0

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

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

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

                      \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                    4. lower--.f6439.3%

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

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

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

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

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

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

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

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

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

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

                  if -4.9999999999999999e-13 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e-220

                  1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x \cdot 1 \]
                  6. Step-by-step derivation
                    1. Applied rewrites51.1%

                      \[\leadsto x \cdot 1 \]

                    if 2e-220 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.9999999999999999e58

                    1. Initial program 85.7%

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

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

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

                    Alternative 6: 77.2% accurate, 0.8× speedup?

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

                      1. Initial program 85.7%

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

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

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

                        if -6.1999999999999999e-25 < z < 0.28000000000000003

                        1. Initial program 85.7%

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

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

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

                            \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
                          4. mult-flip-revN/A

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

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

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

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

                            \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot t \]
                          9. sub-negate-revN/A

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

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

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

                            \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot t \]
                          13. sub-negate-revN/A

                            \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot t \]
                          14. lower--.f6498.4%

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

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

                          \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot t \]
                        5. Step-by-step derivation
                          1. lower-/.f6461.8%

                            \[\leadsto x + \frac{y}{\color{blue}{a}} \cdot t \]
                        6. Applied rewrites61.8%

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

                      Alternative 7: 76.1% accurate, 0.8× speedup?

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

                        1. Initial program 85.7%

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

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

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

                          if -6.1999999999999999e-25 < z < 0.28000000000000003

                          1. Initial program 85.7%

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

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

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

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

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

                        Alternative 8: 68.0% accurate, 0.2× speedup?

                        \[\begin{array}{l} t_1 := \frac{z - y}{z} \cdot t\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -0.0005:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\ \;\;\;\;x \cdot 1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+137}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                        (FPCore (x y z t a)
                          :precision binary64
                          (let* ((t_1 (* (/ (- z y) z) t)) (t_2 (/ (* (- y z) t) (- a z))))
                          (if (<= t_2 -1e+124)
                            t_1
                            (if (<= t_2 -0.0005)
                              (+ x t)
                              (if (<= t_2 2e-220)
                                (* x 1.0)
                                (if (<= t_2 2e+137)
                                  (+ x t)
                                  (if (<= t_2 5e+262) (/ (* t (- y z)) a) t_1)))))))
                        double code(double x, double y, double z, double t, double a) {
                        	double t_1 = ((z - y) / z) * t;
                        	double t_2 = ((y - z) * t) / (a - z);
                        	double tmp;
                        	if (t_2 <= -1e+124) {
                        		tmp = t_1;
                        	} else if (t_2 <= -0.0005) {
                        		tmp = x + t;
                        	} else if (t_2 <= 2e-220) {
                        		tmp = x * 1.0;
                        	} else if (t_2 <= 2e+137) {
                        		tmp = x + t;
                        	} else if (t_2 <= 5e+262) {
                        		tmp = (t * (y - z)) / a;
                        	} 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 = ((z - y) / z) * t
                            t_2 = ((y - z) * t) / (a - z)
                            if (t_2 <= (-1d+124)) then
                                tmp = t_1
                            else if (t_2 <= (-0.0005d0)) then
                                tmp = x + t
                            else if (t_2 <= 2d-220) then
                                tmp = x * 1.0d0
                            else if (t_2 <= 2d+137) then
                                tmp = x + t
                            else if (t_2 <= 5d+262) then
                                tmp = (t * (y - z)) / a
                            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 = ((z - y) / z) * t;
                        	double t_2 = ((y - z) * t) / (a - z);
                        	double tmp;
                        	if (t_2 <= -1e+124) {
                        		tmp = t_1;
                        	} else if (t_2 <= -0.0005) {
                        		tmp = x + t;
                        	} else if (t_2 <= 2e-220) {
                        		tmp = x * 1.0;
                        	} else if (t_2 <= 2e+137) {
                        		tmp = x + t;
                        	} else if (t_2 <= 5e+262) {
                        		tmp = (t * (y - z)) / a;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	t_1 = ((z - y) / z) * t
                        	t_2 = ((y - z) * t) / (a - z)
                        	tmp = 0
                        	if t_2 <= -1e+124:
                        		tmp = t_1
                        	elif t_2 <= -0.0005:
                        		tmp = x + t
                        	elif t_2 <= 2e-220:
                        		tmp = x * 1.0
                        	elif t_2 <= 2e+137:
                        		tmp = x + t
                        	elif t_2 <= 5e+262:
                        		tmp = (t * (y - z)) / a
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	t_1 = Float64(Float64(Float64(z - y) / z) * t)
                        	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
                        	tmp = 0.0
                        	if (t_2 <= -1e+124)
                        		tmp = t_1;
                        	elseif (t_2 <= -0.0005)
                        		tmp = Float64(x + t);
                        	elseif (t_2 <= 2e-220)
                        		tmp = Float64(x * 1.0);
                        	elseif (t_2 <= 2e+137)
                        		tmp = Float64(x + t);
                        	elseif (t_2 <= 5e+262)
                        		tmp = Float64(Float64(t * Float64(y - z)) / a);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	t_1 = ((z - y) / z) * t;
                        	t_2 = ((y - z) * t) / (a - z);
                        	tmp = 0.0;
                        	if (t_2 <= -1e+124)
                        		tmp = t_1;
                        	elseif (t_2 <= -0.0005)
                        		tmp = x + t;
                        	elseif (t_2 <= 2e-220)
                        		tmp = x * 1.0;
                        	elseif (t_2 <= 2e+137)
                        		tmp = x + t;
                        	elseif (t_2 <= 5e+262)
                        		tmp = (t * (y - z)) / a;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+124], t$95$1, If[LessEqual[t$95$2, -0.0005], N[(x + t), $MachinePrecision], If[LessEqual[t$95$2, 2e-220], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$2, 2e+137], N[(x + t), $MachinePrecision], If[LessEqual[t$95$2, 5e+262], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]]]
                        
                        \begin{array}{l}
                        t_1 := \frac{z - y}{z} \cdot t\\
                        t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                        \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t\_2 \leq -0.0005:\\
                        \;\;\;\;x + t\\
                        
                        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\
                        \;\;\;\;x \cdot 1\\
                        
                        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+137}:\\
                        \;\;\;\;x + t\\
                        
                        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\
                        \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 4 regimes
                        2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -9.9999999999999995e123 or 5.0000000000000001e262 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                          1. Initial program 85.7%

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

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

                              \[\leadsto x + \color{blue}{t} \]
                            2. Taylor expanded in x around 0

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

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

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

                                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                              4. lower--.f6439.3%

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

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

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

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

                                \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                              4. *-commutativeN/A

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

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

                                \[\leadsto \frac{y - z}{a - z} \cdot t \]
                              7. sub-negate-revN/A

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

                                \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{a - z} \cdot t \]
                              9. sub-negate-revN/A

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

                                \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot t \]
                              11. frac-2negN/A

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

                                \[\leadsto \frac{z - y}{z - a} \cdot t \]
                              13. lower--.f6449.2%

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

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

                              \[\leadsto \frac{z - y}{z} \cdot t \]
                            8. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{z - y}{z} \cdot t \]
                              2. lower--.f6431.5%

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

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

                            if -9.9999999999999995e123 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.0000000000000001e-4 or 2e-220 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.0000000000000001e137

                            1. Initial program 85.7%

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

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

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

                              if -5.0000000000000001e-4 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e-220

                              1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x \cdot 1 \]
                              6. Step-by-step derivation
                                1. Applied rewrites51.1%

                                  \[\leadsto x \cdot 1 \]

                                if 2.0000000000000001e137 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000001e262

                                1. Initial program 85.7%

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

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

                                    \[\leadsto x + \color{blue}{t} \]
                                  2. Taylor expanded in x around 0

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

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

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

                                      \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                                    4. lower--.f6439.3%

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

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

                                    \[\leadsto \frac{t \cdot \left(y - z\right)}{a} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites21.5%

                                      \[\leadsto \frac{t \cdot \left(y - z\right)}{a} \]
                                  7. Recombined 4 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 9: 68.0% accurate, 0.2× speedup?

                                  \[\begin{array}{l} t_1 := \frac{z - y}{z} \cdot t\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -0.0005:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\ \;\;\;\;x \cdot 1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+137}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\frac{t}{a} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                  (FPCore (x y z t a)
                                    :precision binary64
                                    (let* ((t_1 (* (/ (- z y) z) t)) (t_2 (/ (* (- y z) t) (- a z))))
                                    (if (<= t_2 -1e+124)
                                      t_1
                                      (if (<= t_2 -0.0005)
                                        (+ x t)
                                        (if (<= t_2 2e-220)
                                          (* x 1.0)
                                          (if (<= t_2 2e+137)
                                            (+ x t)
                                            (if (<= t_2 5e+262) (* (/ t a) (- y z)) t_1)))))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double t_1 = ((z - y) / z) * t;
                                  	double t_2 = ((y - z) * t) / (a - z);
                                  	double tmp;
                                  	if (t_2 <= -1e+124) {
                                  		tmp = t_1;
                                  	} else if (t_2 <= -0.0005) {
                                  		tmp = x + t;
                                  	} else if (t_2 <= 2e-220) {
                                  		tmp = x * 1.0;
                                  	} else if (t_2 <= 2e+137) {
                                  		tmp = x + t;
                                  	} else if (t_2 <= 5e+262) {
                                  		tmp = (t / a) * (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 = ((z - y) / z) * t
                                      t_2 = ((y - z) * t) / (a - z)
                                      if (t_2 <= (-1d+124)) then
                                          tmp = t_1
                                      else if (t_2 <= (-0.0005d0)) then
                                          tmp = x + t
                                      else if (t_2 <= 2d-220) then
                                          tmp = x * 1.0d0
                                      else if (t_2 <= 2d+137) then
                                          tmp = x + t
                                      else if (t_2 <= 5d+262) then
                                          tmp = (t / a) * (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 = ((z - y) / z) * t;
                                  	double t_2 = ((y - z) * t) / (a - z);
                                  	double tmp;
                                  	if (t_2 <= -1e+124) {
                                  		tmp = t_1;
                                  	} else if (t_2 <= -0.0005) {
                                  		tmp = x + t;
                                  	} else if (t_2 <= 2e-220) {
                                  		tmp = x * 1.0;
                                  	} else if (t_2 <= 2e+137) {
                                  		tmp = x + t;
                                  	} else if (t_2 <= 5e+262) {
                                  		tmp = (t / a) * (y - z);
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	t_1 = ((z - y) / z) * t
                                  	t_2 = ((y - z) * t) / (a - z)
                                  	tmp = 0
                                  	if t_2 <= -1e+124:
                                  		tmp = t_1
                                  	elif t_2 <= -0.0005:
                                  		tmp = x + t
                                  	elif t_2 <= 2e-220:
                                  		tmp = x * 1.0
                                  	elif t_2 <= 2e+137:
                                  		tmp = x + t
                                  	elif t_2 <= 5e+262:
                                  		tmp = (t / a) * (y - z)
                                  	else:
                                  		tmp = t_1
                                  	return tmp
                                  
                                  function code(x, y, z, t, a)
                                  	t_1 = Float64(Float64(Float64(z - y) / z) * t)
                                  	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
                                  	tmp = 0.0
                                  	if (t_2 <= -1e+124)
                                  		tmp = t_1;
                                  	elseif (t_2 <= -0.0005)
                                  		tmp = Float64(x + t);
                                  	elseif (t_2 <= 2e-220)
                                  		tmp = Float64(x * 1.0);
                                  	elseif (t_2 <= 2e+137)
                                  		tmp = Float64(x + t);
                                  	elseif (t_2 <= 5e+262)
                                  		tmp = Float64(Float64(t / a) * Float64(y - z));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a)
                                  	t_1 = ((z - y) / z) * t;
                                  	t_2 = ((y - z) * t) / (a - z);
                                  	tmp = 0.0;
                                  	if (t_2 <= -1e+124)
                                  		tmp = t_1;
                                  	elseif (t_2 <= -0.0005)
                                  		tmp = x + t;
                                  	elseif (t_2 <= 2e-220)
                                  		tmp = x * 1.0;
                                  	elseif (t_2 <= 2e+137)
                                  		tmp = x + t;
                                  	elseif (t_2 <= 5e+262)
                                  		tmp = (t / a) * (y - z);
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+124], t$95$1, If[LessEqual[t$95$2, -0.0005], N[(x + t), $MachinePrecision], If[LessEqual[t$95$2, 2e-220], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$2, 2e+137], N[(x + t), $MachinePrecision], If[LessEqual[t$95$2, 5e+262], N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
                                  
                                  \begin{array}{l}
                                  t_1 := \frac{z - y}{z} \cdot t\\
                                  t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                                  \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;t\_2 \leq -0.0005:\\
                                  \;\;\;\;x + t\\
                                  
                                  \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\
                                  \;\;\;\;x \cdot 1\\
                                  
                                  \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+137}:\\
                                  \;\;\;\;x + t\\
                                  
                                  \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\
                                  \;\;\;\;\frac{t}{a} \cdot \left(y - z\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 4 regimes
                                  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -9.9999999999999995e123 or 5.0000000000000001e262 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                                    1. Initial program 85.7%

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

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

                                        \[\leadsto x + \color{blue}{t} \]
                                      2. Taylor expanded in x around 0

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

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

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

                                          \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                                        4. lower--.f6439.3%

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

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

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

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

                                          \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                                        4. *-commutativeN/A

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

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

                                          \[\leadsto \frac{y - z}{a - z} \cdot t \]
                                        7. sub-negate-revN/A

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

                                          \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{a - z} \cdot t \]
                                        9. sub-negate-revN/A

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

                                          \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot t \]
                                        11. frac-2negN/A

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

                                          \[\leadsto \frac{z - y}{z - a} \cdot t \]
                                        13. lower--.f6449.2%

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

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

                                        \[\leadsto \frac{z - y}{z} \cdot t \]
                                      8. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \frac{z - y}{z} \cdot t \]
                                        2. lower--.f6431.5%

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

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

                                      if -9.9999999999999995e123 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.0000000000000001e-4 or 2e-220 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.0000000000000001e137

                                      1. Initial program 85.7%

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

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

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

                                        if -5.0000000000000001e-4 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e-220

                                        1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto x \cdot 1 \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites51.1%

                                            \[\leadsto x \cdot 1 \]

                                          if 2.0000000000000001e137 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000001e262

                                          1. Initial program 85.7%

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

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

                                              \[\leadsto x + \color{blue}{t} \]
                                            2. Taylor expanded in x around 0

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

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

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

                                                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                                              4. lower--.f6439.3%

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

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

                                              \[\leadsto \frac{t \cdot \left(y - z\right)}{a} \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites21.5%

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

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

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

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

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

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

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

                                                  \[\leadsto \left(t \cdot \frac{1}{a}\right) \cdot \color{blue}{\left(y - z\right)} \]
                                                8. mult-flip-revN/A

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

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

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

                                            Alternative 10: 67.8% accurate, 0.2× speedup?

                                            \[\begin{array}{l} t_1 := \frac{z - y}{z} \cdot t\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -0.0005:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\ \;\;\;\;x \cdot 1\\ \mathbf{elif}\;t\_2 \leq 10^{+195}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                            (FPCore (x y z t a)
                                              :precision binary64
                                              (let* ((t_1 (* (/ (- z y) z) t)) (t_2 (/ (* (- y z) t) (- a z))))
                                              (if (<= t_2 -1e+124)
                                                t_1
                                                (if (<= t_2 -0.0005)
                                                  (+ x t)
                                                  (if (<= t_2 2e-220)
                                                    (* x 1.0)
                                                    (if (<= t_2 1e+195) (+ x t) t_1))))))
                                            double code(double x, double y, double z, double t, double a) {
                                            	double t_1 = ((z - y) / z) * t;
                                            	double t_2 = ((y - z) * t) / (a - z);
                                            	double tmp;
                                            	if (t_2 <= -1e+124) {
                                            		tmp = t_1;
                                            	} else if (t_2 <= -0.0005) {
                                            		tmp = x + t;
                                            	} else if (t_2 <= 2e-220) {
                                            		tmp = x * 1.0;
                                            	} else if (t_2 <= 1e+195) {
                                            		tmp = x + t;
                                            	} 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 = ((z - y) / z) * t
                                                t_2 = ((y - z) * t) / (a - z)
                                                if (t_2 <= (-1d+124)) then
                                                    tmp = t_1
                                                else if (t_2 <= (-0.0005d0)) then
                                                    tmp = x + t
                                                else if (t_2 <= 2d-220) then
                                                    tmp = x * 1.0d0
                                                else if (t_2 <= 1d+195) then
                                                    tmp = x + t
                                                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 = ((z - y) / z) * t;
                                            	double t_2 = ((y - z) * t) / (a - z);
                                            	double tmp;
                                            	if (t_2 <= -1e+124) {
                                            		tmp = t_1;
                                            	} else if (t_2 <= -0.0005) {
                                            		tmp = x + t;
                                            	} else if (t_2 <= 2e-220) {
                                            		tmp = x * 1.0;
                                            	} else if (t_2 <= 1e+195) {
                                            		tmp = x + t;
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a):
                                            	t_1 = ((z - y) / z) * t
                                            	t_2 = ((y - z) * t) / (a - z)
                                            	tmp = 0
                                            	if t_2 <= -1e+124:
                                            		tmp = t_1
                                            	elif t_2 <= -0.0005:
                                            		tmp = x + t
                                            	elif t_2 <= 2e-220:
                                            		tmp = x * 1.0
                                            	elif t_2 <= 1e+195:
                                            		tmp = x + t
                                            	else:
                                            		tmp = t_1
                                            	return tmp
                                            
                                            function code(x, y, z, t, a)
                                            	t_1 = Float64(Float64(Float64(z - y) / z) * t)
                                            	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
                                            	tmp = 0.0
                                            	if (t_2 <= -1e+124)
                                            		tmp = t_1;
                                            	elseif (t_2 <= -0.0005)
                                            		tmp = Float64(x + t);
                                            	elseif (t_2 <= 2e-220)
                                            		tmp = Float64(x * 1.0);
                                            	elseif (t_2 <= 1e+195)
                                            		tmp = Float64(x + t);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a)
                                            	t_1 = ((z - y) / z) * t;
                                            	t_2 = ((y - z) * t) / (a - z);
                                            	tmp = 0.0;
                                            	if (t_2 <= -1e+124)
                                            		tmp = t_1;
                                            	elseif (t_2 <= -0.0005)
                                            		tmp = x + t;
                                            	elseif (t_2 <= 2e-220)
                                            		tmp = x * 1.0;
                                            	elseif (t_2 <= 1e+195)
                                            		tmp = x + t;
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+124], t$95$1, If[LessEqual[t$95$2, -0.0005], N[(x + t), $MachinePrecision], If[LessEqual[t$95$2, 2e-220], N[(x * 1.0), $MachinePrecision], If[LessEqual[t$95$2, 1e+195], N[(x + t), $MachinePrecision], t$95$1]]]]]]
                                            
                                            \begin{array}{l}
                                            t_1 := \frac{z - y}{z} \cdot t\\
                                            t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                                            \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+124}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;t\_2 \leq -0.0005:\\
                                            \;\;\;\;x + t\\
                                            
                                            \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-220}:\\
                                            \;\;\;\;x \cdot 1\\
                                            
                                            \mathbf{elif}\;t\_2 \leq 10^{+195}:\\
                                            \;\;\;\;x + t\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -9.9999999999999995e123 or 9.9999999999999998e194 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                                              1. Initial program 85.7%

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

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

                                                  \[\leadsto x + \color{blue}{t} \]
                                                2. Taylor expanded in x around 0

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

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

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

                                                    \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                                                  4. lower--.f6439.3%

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

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

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

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

                                                    \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                                                  4. *-commutativeN/A

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

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

                                                    \[\leadsto \frac{y - z}{a - z} \cdot t \]
                                                  7. sub-negate-revN/A

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

                                                    \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{a - z} \cdot t \]
                                                  9. sub-negate-revN/A

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

                                                    \[\leadsto \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot t \]
                                                  11. frac-2negN/A

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

                                                    \[\leadsto \frac{z - y}{z - a} \cdot t \]
                                                  13. lower--.f6449.2%

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

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

                                                  \[\leadsto \frac{z - y}{z} \cdot t \]
                                                8. Step-by-step derivation
                                                  1. lower-/.f64N/A

                                                    \[\leadsto \frac{z - y}{z} \cdot t \]
                                                  2. lower--.f6431.5%

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

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

                                                if -9.9999999999999995e123 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.0000000000000001e-4 or 2e-220 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.9999999999999998e194

                                                1. Initial program 85.7%

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

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

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

                                                  if -5.0000000000000001e-4 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e-220

                                                  1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto x \cdot 1 \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites51.1%

                                                      \[\leadsto x \cdot 1 \]
                                                  7. Recombined 3 regimes into one program.
                                                  8. Add Preprocessing

                                                  Alternative 11: 64.3% accurate, 1.4× speedup?

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

                                                    1. Initial program 85.7%

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

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

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

                                                      if -4.0000000000000002e-25 < z < 4.4000000000000001e-22

                                                      1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto x \cdot 1 \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites51.1%

                                                          \[\leadsto x \cdot 1 \]
                                                      7. Recombined 2 regimes into one program.
                                                      8. Add Preprocessing

                                                      Alternative 12: 61.1% accurate, 6.5× speedup?

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

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

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

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

                                                        Reproduce

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