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

Percentage Accurate: 77.4% → 92.5%
Time: 3.9s
Alternatives: 11
Speedup: 0.9×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 77.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 92.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-65}:\\
\;\;\;\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4e-79 or 4.8000000000000003e-65 < y

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\frac{t}{a - t} + 1\right) + \frac{x}{y}\right) - \frac{z}{a - t}\right) \cdot y \]
      12. lift--.f6491.0

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

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

    if -4e-79 < y < 4.8000000000000003e-65

    1. Initial program 94.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 89.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z - a}{t} \cdot y + x\\
\mathbf{if}\;t \leq -5 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+114}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.0000000000000002e160 or 1.3e114 < t

    1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x \]
      9. lower-*.f6477.2

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

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

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

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

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

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

        \[\leadsto \frac{z - a}{t} \cdot y + x \]
      5. lower--.f6489.6

        \[\leadsto \frac{z - a}{t} \cdot y + x \]
    7. Applied rewrites89.6%

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

    if -5.0000000000000002e160 < t < 1.3e114

    1. Initial program 86.8%

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

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

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

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

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

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

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

Alternative 3: 78.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -16600000:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq -8.8 \cdot 10^{-115}:\\
\;\;\;\;x - \frac{\left(z - t\right) \cdot y}{a - t}\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.66e7

    1. Initial program 79.4%

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

      \[\leadsto \color{blue}{x + y} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. lower-+.f6475.2

        \[\leadsto y + \color{blue}{x} \]
    4. Applied rewrites75.2%

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

    if -1.66e7 < a < -8.7999999999999997e-115

    1. Initial program 74.8%

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

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

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

      if -8.7999999999999997e-115 < a < 4.19999999999999987e-39

      1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \frac{z}{t} + x \]
        3. associate-*r/N/A

          \[\leadsto \frac{y \cdot z}{t} + x \]
        4. *-commutativeN/A

          \[\leadsto \frac{z \cdot y}{t} + x \]
        5. associate-/l*N/A

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

          \[\leadsto \mathsf{fma}\left(z, \frac{y}{\color{blue}{t}}, x\right) \]
        7. lift-/.f6480.6

          \[\leadsto \mathsf{fma}\left(z, \frac{y}{t}, x\right) \]
      9. Applied rewrites80.6%

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

      if 4.19999999999999987e-39 < a

      1. Initial program 81.0%

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

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

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

          \[\leadsto \left(x + y\right) - \frac{z \cdot y}{a} \]
        3. lower-*.f6480.0

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

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

    Alternative 4: 77.5% accurate, 0.9× speedup?

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

      1. Initial program 79.6%

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

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

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

          \[\leadsto \left(x + y\right) - \frac{z \cdot y}{a} \]
        3. lower-*.f6478.0

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

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

      if -2.40000000000000006e-79 < a < 4.19999999999999987e-39

      1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x \]
        9. lower-*.f6481.6

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \frac{z}{t} + x \]
        3. associate-*r/N/A

          \[\leadsto \frac{y \cdot z}{t} + x \]
        4. *-commutativeN/A

          \[\leadsto \frac{z \cdot y}{t} + x \]
        5. associate-/l*N/A

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

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

          \[\leadsto \mathsf{fma}\left(z, \frac{y}{t}, x\right) \]
      9. Applied rewrites80.3%

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

    Alternative 5: 76.1% accurate, 0.9× speedup?

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

      1. Initial program 80.1%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. lower-+.f6480.6

          \[\leadsto y + \color{blue}{x} \]
      4. Applied rewrites80.6%

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

      if -9.1999999999999992e134 < a < -2.3999999999999999e-77

      1. Initial program 77.9%

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

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

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

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

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

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

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

            if -2.3999999999999999e-77 < a < 3.4e28

            1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x \]
              9. lower-*.f6479.2

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{z}{t} + x \]
              3. associate-*r/N/A

                \[\leadsto \frac{y \cdot z}{t} + x \]
              4. *-commutativeN/A

                \[\leadsto \frac{z \cdot y}{t} + x \]
              5. associate-/l*N/A

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

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

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

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

          Alternative 6: 76.1% accurate, 1.1× speedup?

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

            1. Initial program 80.0%

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

              \[\leadsto \color{blue}{x + y} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto y + \color{blue}{x} \]
              2. lower-+.f6476.6

                \[\leadsto y + \color{blue}{x} \]
            4. Applied rewrites76.6%

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

            if -46000 < a < 3.4e28

            1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x \]
              9. lower-*.f6477.4

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{z}{t} + x \]
              3. associate-*r/N/A

                \[\leadsto \frac{y \cdot z}{t} + x \]
              4. *-commutativeN/A

                \[\leadsto \frac{z \cdot y}{t} + x \]
              5. associate-/l*N/A

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

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

                \[\leadsto \mathsf{fma}\left(z, \frac{y}{t}, x\right) \]
            9. Applied rewrites75.6%

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

          Alternative 7: 75.6% accurate, 1.1× speedup?

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

            1. Initial program 80.0%

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

              \[\leadsto \color{blue}{x + y} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto y + \color{blue}{x} \]
              2. lower-+.f6476.6

                \[\leadsto y + \color{blue}{x} \]
            4. Applied rewrites76.6%

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

            if -46000 < a < 3.4e28

            1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x \]
              9. lower-*.f6477.4

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

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

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

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

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

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

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

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

          Alternative 8: 61.2% accurate, 0.6× speedup?

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

            1. Initial program 81.9%

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

              \[\leadsto \color{blue}{x + y} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto y + \color{blue}{x} \]
              2. lower-+.f6464.5

                \[\leadsto y + \color{blue}{x} \]
            4. Applied rewrites64.5%

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

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

            1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot z}{t} \]
              2. *-commutativeN/A

                \[\leadsto \frac{z \cdot y}{t} \]
              3. lift-*.f6430.7

                \[\leadsto \frac{z \cdot y}{t} \]
            7. Applied rewrites30.7%

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

                \[\leadsto \frac{z \cdot y}{t} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{z \cdot y}{t} \]
              3. *-commutativeN/A

                \[\leadsto \frac{y \cdot z}{t} \]
              4. associate-*r/N/A

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

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

                \[\leadsto \frac{z}{t} \cdot y \]
              7. lift-/.f6438.7

                \[\leadsto \frac{z}{t} \cdot y \]
            9. Applied rewrites38.7%

              \[\leadsto \frac{z}{t} \cdot y \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 9: 61.2% accurate, 0.6× speedup?

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

            1. Initial program 81.9%

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

              \[\leadsto \color{blue}{x + y} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto y + \color{blue}{x} \]
              2. lower-+.f6464.5

                \[\leadsto y + \color{blue}{x} \]
            4. Applied rewrites64.5%

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

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

            1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot z}{t} \]
              2. *-commutativeN/A

                \[\leadsto \frac{z \cdot y}{t} \]
              3. lift-*.f6430.7

                \[\leadsto \frac{z \cdot y}{t} \]
            7. Applied rewrites30.7%

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

                \[\leadsto \frac{z \cdot y}{t} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{z \cdot y}{t} \]
              3. associate-/l*N/A

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

                \[\leadsto z \cdot \frac{y}{\color{blue}{t}} \]
              5. lift-/.f6439.1

                \[\leadsto z \cdot \frac{y}{t} \]
            9. Applied rewrites39.1%

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

          Alternative 10: 61.1% accurate, 1.6× speedup?

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

            1. Initial program 79.8%

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

              \[\leadsto \color{blue}{x + y} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto y + \color{blue}{x} \]
              2. lower-+.f6472.4

                \[\leadsto y + \color{blue}{x} \]
            4. Applied rewrites72.4%

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

            if -9.1999999999999992e134 < a < 7.80000000000000038e-140

            1. Initial program 75.0%

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

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

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

            Alternative 11: 50.1% accurate, 17.9× speedup?

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

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

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

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

              Reproduce

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