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

Percentage Accurate: 86.0% → 99.8%
Time: 2.2min
Alternatives: 13
Speedup: 1.0×

Specification

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 86.0% accurate, 1.0× speedup?

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

Alternative 1: 99.8% accurate, 0.7× speedup?

\[x + \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), y, t, z, y\right) \]
(FPCore (x y z t a)
  :precision binary64
  (+ x (134-z0z1z2z3z4 (/ -1 (- z a)) y t z y)))
x + \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), y, t, z, y\right)
Derivation
  1. Initial program 86.0%

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

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

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

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

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

      \[\leadsto x + \frac{1}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y \cdot \left(z - t\right)\right)\right) \cdot 1\right)} \]
    6. distribute-lft-neg-outN/A

      \[\leadsto x + \frac{1}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot \left(z - t\right)\right) \cdot 1\right)\right)} \]
    7. *-rgt-identityN/A

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

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

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

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

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

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

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

      \[\leadsto x + \frac{1}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}\right)\right) - z \cdot y\right) \]
    15. distribute-rgt-neg-outN/A

      \[\leadsto x + \frac{1}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(\color{blue}{y \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - z \cdot y\right) \]
    16. remove-double-negN/A

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

      \[\leadsto x + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{\mathsf{neg}\left(\left(z - a\right)\right)}\right), y, t, z, y\right)} \]
    18. metadata-evalN/A

      \[\leadsto x + \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\left(z - a\right)\right)}\right), y, t, z, y\right) \]
    19. frac-2neg-revN/A

      \[\leadsto x + \mathsf{134\_z0z1z2z3z4}\left(\color{blue}{\left(\frac{-1}{z - a}\right)}, y, t, z, y\right) \]
    20. lower-/.f6499.8%

      \[\leadsto x + \mathsf{134\_z0z1z2z3z4}\left(\color{blue}{\left(\frac{-1}{z - a}\right)}, y, t, z, y\right) \]
  3. Applied rewrites99.8%

    \[\leadsto x + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), y, t, z, y\right)} \]
  4. Add Preprocessing

Alternative 2: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.8% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq \frac{2381976568446569}{340282366920938463463374607431768211456}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(z - t\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8000000000000004e-68 or 6.9999999999999993e-24 < z

    1. Initial program 86.0%

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

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

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

        \[\leadsto x + \frac{y \cdot \left(z - t\right)}{z} \]
      3. lower--.f6459.2%

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{z + \left(\mathsf{neg}\left(t\right)\right)}{z} \]
      6. div-addN/A

        \[\leadsto x + y \cdot \left(\frac{z}{z} + \color{blue}{\frac{\mathsf{neg}\left(t\right)}{z}}\right) \]
      7. distribute-rgt-inN/A

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

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

        \[\leadsto x + \left(y \cdot 1 + \color{blue}{\frac{\mathsf{neg}\left(t\right)}{z}} \cdot y\right) \]
      10. *-rgt-identityN/A

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

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

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

        \[\leadsto x + \left(y + \frac{\mathsf{neg}\left(t\right)}{z} \cdot y\right) \]
      14. lower-neg.f6467.0%

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

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

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

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

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

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

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

        \[\leadsto x + \left(y - \left(\mathsf{neg}\left(\frac{-t}{z}\right)\right) \cdot y\right) \]
      7. distribute-neg-frac2N/A

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

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

        \[\leadsto x + \left(y - \frac{t}{z} \cdot y\right) \]
      10. lower-/.f6467.0%

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

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

    if -3.8000000000000004e-68 < z < 6.9999999999999993e-24

    1. Initial program 86.0%

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

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}}\right)\right) \]
      5. distribute-neg-frac2N/A

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\color{blue}{a - z}} \cdot \left(z - t\right) \]
      14. lower--.f6495.8%

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

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

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

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

    Alternative 4: 83.1% accurate, 0.3× speedup?

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

      1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(z - t\right) \]
        15. distribute-neg-frac2N/A

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

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

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

          \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
        19. lower-/.f6447.0%

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

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

      if -1.0000000000000001e84 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.9999999999999991e211

      1. Initial program 86.0%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot z}}{z - a} \]
      3. Step-by-step derivation
        1. lower-*.f6463.0%

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

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

    Alternative 5: 81.3% accurate, 0.7× speedup?

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

      1. Initial program 86.0%

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

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

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

          \[\leadsto x + \frac{y \cdot \left(z - t\right)}{z} \]
        3. lower--.f6459.2%

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

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

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

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

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

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

          \[\leadsto x + y \cdot \frac{z + \left(\mathsf{neg}\left(t\right)\right)}{z} \]
        6. div-addN/A

          \[\leadsto x + y \cdot \left(\frac{z}{z} + \color{blue}{\frac{\mathsf{neg}\left(t\right)}{z}}\right) \]
        7. distribute-rgt-inN/A

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

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

          \[\leadsto x + \left(y \cdot 1 + \color{blue}{\frac{\mathsf{neg}\left(t\right)}{z}} \cdot y\right) \]
        10. *-rgt-identityN/A

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

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

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

          \[\leadsto x + \left(y + \frac{\mathsf{neg}\left(t\right)}{z} \cdot y\right) \]
        14. lower-neg.f6467.0%

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

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

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

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

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

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

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

          \[\leadsto x + \left(y - \left(\mathsf{neg}\left(\frac{-t}{z}\right)\right) \cdot y\right) \]
        7. distribute-neg-frac2N/A

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

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

          \[\leadsto x + \left(y - \frac{t}{z} \cdot y\right) \]
        10. lower-/.f6467.0%

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

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

      if -3.9000000000000003e-68 < z < 8.2000000000000003e-24

      1. Initial program 86.0%

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

    Alternative 6: 77.4% accurate, 0.2× speedup?

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

      1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(z - t\right) \]
        15. distribute-neg-frac2N/A

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

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

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

          \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
        19. lower-/.f6447.0%

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

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

      if -4.9999999999999999e37 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.9999999999999999e-129

      1. Initial program 86.0%

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

      if 1.9999999999999999e-129 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2e41

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

    Alternative 7: 75.4% accurate, 0.8× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq \frac{-3419097250317283}{15541351137805832567355695254588151253139254712417116170014499277911234281641667985408}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq \frac{6628619432568335}{401734511064747568885490523085290650630550748445698208825344}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<=
         z
         -3419097250317283/15541351137805832567355695254588151253139254712417116170014499277911234281641667985408)
      (+ x y)
      (if (<=
           z
           6628619432568335/401734511064747568885490523085290650630550748445698208825344)
        (+ x (/ (* t y) a))
        (+ x y))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -2.2e-70) {
    		tmp = x + y;
    	} else if (z <= 1.65e-44) {
    		tmp = x + ((t * y) / a);
    	} else {
    		tmp = x + 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 (z <= (-2.2d-70)) then
            tmp = x + y
        else if (z <= 1.65d-44) then
            tmp = x + ((t * y) / a)
        else
            tmp = x + y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -2.2e-70) {
    		tmp = x + y;
    	} else if (z <= 1.65e-44) {
    		tmp = x + ((t * y) / a);
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -2.2e-70:
    		tmp = x + y
    	elif z <= 1.65e-44:
    		tmp = x + ((t * y) / a)
    	else:
    		tmp = x + y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -2.2e-70)
    		tmp = Float64(x + y);
    	elseif (z <= 1.65e-44)
    		tmp = Float64(x + Float64(Float64(t * y) / a));
    	else
    		tmp = Float64(x + y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -2.2e-70)
    		tmp = x + y;
    	elseif (z <= 1.65e-44)
    		tmp = x + ((t * y) / a);
    	else
    		tmp = x + y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3419097250317283/15541351137805832567355695254588151253139254712417116170014499277911234281641667985408], N[(x + y), $MachinePrecision], If[LessEqual[z, 6628619432568335/401734511064747568885490523085290650630550748445698208825344], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq \frac{-3419097250317283}{15541351137805832567355695254588151253139254712417116170014499277911234281641667985408}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;z \leq \frac{6628619432568335}{401734511064747568885490523085290650630550748445698208825344}:\\
    \;\;\;\;x + \frac{t \cdot y}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.1999999999999999e-70 or 1.65e-44 < z

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

      if -2.1999999999999999e-70 < z < 1.65e-44

      1. Initial program 86.0%

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

    Alternative 8: 66.0% accurate, 0.8× speedup?

    \[\begin{array}{l} t_1 := \frac{t}{a - z} \cdot y\\ \mathbf{if}\;t \leq -880000000000000000559412779227593713244479057886814510579695035987086734044415740561590042837049844683762225240309591439136464158261702650571450449034321583032430514237024259462561023866403548347498496:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 420000000000000033491466275664334310586368600641076726165376733153092337212076508231651863908544757014501101358110039896911107826744981946958856260936274556070100633499712063827907696367756706977585567388591565307904:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (let* ((t_1 (* (/ t (- a z)) y)))
      (if (<=
           t
           -880000000000000000559412779227593713244479057886814510579695035987086734044415740561590042837049844683762225240309591439136464158261702650571450449034321583032430514237024259462561023866403548347498496)
        t_1
        (if (<=
             t
             420000000000000033491466275664334310586368600641076726165376733153092337212076508231651863908544757014501101358110039896911107826744981946958856260936274556070100633499712063827907696367756706977585567388591565307904)
          (+ x y)
          t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (t / (a - z)) * y;
    	double tmp;
    	if (t <= -8.8e+200) {
    		tmp = t_1;
    	} else if (t <= 4.2e+215) {
    		tmp = x + y;
    	} 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 - z)) * y
        if (t <= (-8.8d+200)) then
            tmp = t_1
        else if (t <= 4.2d+215) then
            tmp = x + y
        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;
    	double tmp;
    	if (t <= -8.8e+200) {
    		tmp = t_1;
    	} else if (t <= 4.2e+215) {
    		tmp = x + y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (t / (a - z)) * y
    	tmp = 0
    	if t <= -8.8e+200:
    		tmp = t_1
    	elif t <= 4.2e+215:
    		tmp = x + y
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(t / Float64(a - z)) * y)
    	tmp = 0.0
    	if (t <= -8.8e+200)
    		tmp = t_1;
    	elseif (t <= 4.2e+215)
    		tmp = Float64(x + y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (t / (a - z)) * y;
    	tmp = 0.0;
    	if (t <= -8.8e+200)
    		tmp = t_1;
    	elseif (t <= 4.2e+215)
    		tmp = x + y;
    	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] * y), $MachinePrecision]}, If[LessEqual[t, -880000000000000000559412779227593713244479057886814510579695035987086734044415740561590042837049844683762225240309591439136464158261702650571450449034321583032430514237024259462561023866403548347498496], t$95$1, If[LessEqual[t, 420000000000000033491466275664334310586368600641076726165376733153092337212076508231651863908544757014501101358110039896911107826744981946958856260936274556070100633499712063827907696367756706977585567388591565307904], N[(x + y), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := \frac{t}{a - z} \cdot y\\
    \mathbf{if}\;t \leq -880000000000000000559412779227593713244479057886814510579695035987086734044415740561590042837049844683762225240309591439136464158261702650571450449034321583032430514237024259462561023866403548347498496:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 420000000000000033491466275664334310586368600641076726165376733153092337212076508231651863908544757014501101358110039896911107826744981946958856260936274556070100633499712063827907696367756706977585567388591565307904:\\
    \;\;\;\;x + y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -8.8e200 or 4.2000000000000003e215 < t

      1. Initial program 86.0%

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

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}}\right)\right) \]
        5. distribute-neg-frac2N/A

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

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

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

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

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

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

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

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

          \[\leadsto x - \frac{y}{\color{blue}{a - z}} \cdot \left(z - t\right) \]
        14. lower--.f6495.8%

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

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

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

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

          \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
        3. lower--.f6426.2%

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

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

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

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

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

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

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

          \[\leadsto \frac{t}{a - z} \cdot \color{blue}{y} \]
        7. lower-/.f6428.2%

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

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

      if -8.8e200 < t < 4.2000000000000003e215

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

    Alternative 9: 64.6% accurate, 0.3× speedup?

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

      1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(z - t\right) \]
        15. distribute-neg-frac2N/A

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

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

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

          \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
        19. lower-/.f6447.0%

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

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

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

          \[\leadsto \frac{y}{z} \cdot \left(z - t\right) \]
      9. Applied rewrites29.4%

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

      if -4.9999999999999997e165 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.9999999999999998e212

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

    Alternative 10: 60.8% accurate, 0.9× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq \frac{-8338720222318261}{94758184344525691842589080106353915726128296943157752144717531617800961467674370503593652882607817257720198406807316479868870852301929589321550737002025216015896910157522577243058183937475491017166931103132108688408987234729984}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq \frac{-3581533965504637}{188501787658138776526316391973679239907820382867140805681144220780050698265428977917842924316820804490882044531700026161400423140624345724347059987430217219443542346615871751089083876220596224387399635909565487009065232689887930358404389913798458461035797425091600762263250923357187307004059038598692050448905404416}:\\ \;\;\;\;\frac{t}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<=
         z
         -8338720222318261/94758184344525691842589080106353915726128296943157752144717531617800961467674370503593652882607817257720198406807316479868870852301929589321550737002025216015896910157522577243058183937475491017166931103132108688408987234729984)
      (+ x y)
      (if (<=
           z
           -3581533965504637/188501787658138776526316391973679239907820382867140805681144220780050698265428977917842924316820804490882044531700026161400423140624345724347059987430217219443542346615871751089083876220596224387399635909565487009065232689887930358404389913798458461035797425091600762263250923357187307004059038598692050448905404416)
        (* (/ t a) y)
        (+ x y))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -8.8e-212) {
    		tmp = x + y;
    	} else if (z <= -1.9e-299) {
    		tmp = (t / a) * y;
    	} else {
    		tmp = x + 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 (z <= (-8.8d-212)) then
            tmp = x + y
        else if (z <= (-1.9d-299)) then
            tmp = (t / a) * y
        else
            tmp = x + y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -8.8e-212) {
    		tmp = x + y;
    	} else if (z <= -1.9e-299) {
    		tmp = (t / a) * y;
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -8.8e-212:
    		tmp = x + y
    	elif z <= -1.9e-299:
    		tmp = (t / a) * y
    	else:
    		tmp = x + y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -8.8e-212)
    		tmp = Float64(x + y);
    	elseif (z <= -1.9e-299)
    		tmp = Float64(Float64(t / a) * y);
    	else
    		tmp = Float64(x + y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -8.8e-212)
    		tmp = x + y;
    	elseif (z <= -1.9e-299)
    		tmp = (t / a) * y;
    	else
    		tmp = x + y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8338720222318261/94758184344525691842589080106353915726128296943157752144717531617800961467674370503593652882607817257720198406807316479868870852301929589321550737002025216015896910157522577243058183937475491017166931103132108688408987234729984], N[(x + y), $MachinePrecision], If[LessEqual[z, -3581533965504637/188501787658138776526316391973679239907820382867140805681144220780050698265428977917842924316820804490882044531700026161400423140624345724347059987430217219443542346615871751089083876220596224387399635909565487009065232689887930358404389913798458461035797425091600762263250923357187307004059038598692050448905404416], N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision], N[(x + y), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq \frac{-8338720222318261}{94758184344525691842589080106353915726128296943157752144717531617800961467674370503593652882607817257720198406807316479868870852301929589321550737002025216015896910157522577243058183937475491017166931103132108688408987234729984}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;z \leq \frac{-3581533965504637}{188501787658138776526316391973679239907820382867140805681144220780050698265428977917842924316820804490882044531700026161400423140624345724347059987430217219443542346615871751089083876220596224387399635909565487009065232689887930358404389913798458461035797425091600762263250923357187307004059038598692050448905404416}:\\
    \;\;\;\;\frac{t}{a} \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -8.8000000000000001e-212 or -1.9000000000000001e-299 < z

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

      if -8.8000000000000001e-212 < z < -1.9000000000000001e-299

      1. Initial program 86.0%

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

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}}\right)\right) \]
        5. distribute-neg-frac2N/A

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

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

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

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

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

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

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

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

          \[\leadsto x - \frac{y}{\color{blue}{a - z}} \cdot \left(z - t\right) \]
        14. lower--.f6495.8%

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

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

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

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

          \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
        3. lower--.f6426.2%

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

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

        \[\leadsto \frac{t \cdot y}{a} \]
      8. Step-by-step derivation
        1. Applied rewrites18.3%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{t}{a} \cdot y \]
          9. lower-/.f6420.0%

            \[\leadsto \frac{t}{a} \cdot y \]
        3. Applied rewrites20.0%

          \[\leadsto \frac{t}{a} \cdot \color{blue}{y} \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 11: 60.8% accurate, 1.0× speedup?

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

        1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z} \]
        7. Applied rewrites24.3%

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

        if -3.0500000000000002e214 < t

        1. Initial program 86.0%

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

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6460.8%

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

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

      Alternative 12: 60.3% accurate, 6.5× speedup?

      \[x + y \]
      (FPCore (x y z t a)
        :precision binary64
        (+ x y))
      double code(double x, double y, double z, double t, double a) {
      	return x + y;
      }
      
      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
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	return x + y;
      }
      
      def code(x, y, z, t, a):
      	return x + y
      
      function code(x, y, z, t, a)
      	return Float64(x + y)
      end
      
      function tmp = code(x, y, z, t, a)
      	tmp = x + y;
      end
      
      code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
      
      x + y
      
      Derivation
      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

        \[\leadsto \color{blue}{x + y} \]
      5. Add Preprocessing

      Alternative 13: 19.0% accurate, 26.0× speedup?

      \[y \]
      (FPCore (x y z t a)
        :precision binary64
        y)
      double code(double x, double y, double z, double t, double a) {
      	return y;
      }
      
      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 = y
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	return y;
      }
      
      def code(x, y, z, t, a):
      	return y
      
      function code(x, y, z, t, a)
      	return y
      end
      
      function tmp = code(x, y, z, t, a)
      	tmp = y;
      end
      
      code[x_, y_, z_, t_, a_] := y
      
      y
      
      Derivation
      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6460.8%

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

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

        \[\leadsto y \]
      6. Step-by-step derivation
        1. Applied rewrites19.0%

          \[\leadsto y \]
        2. Add Preprocessing

        Reproduce

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