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

Percentage Accurate: 77.5% → 96.5%
Time: 13.3s
Alternatives: 15
Speedup: 0.8×

Specification

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

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

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

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

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

Initial Program: 77.5% accurate, 1.0× speedup?

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

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

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

Alternative 1: 96.5% accurate, 0.5× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.4e71 or 3.3e102 < x

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e71 < x < 3.3e102

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), \left(t - z\right), y, \left(t - a\right), \left(y + x\right)\right)} \]
    4. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

Alternative 2: 91.5% accurate, 0.6× speedup?

\[\begin{array}{l} t_1 := x - \frac{a - z}{t} \cdot y\\ \mathbf{if}\;t \leq -3100000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6499999999999999593644510990384774520498798802555127355660083857349028219105312768:\\ \;\;\;\;\left(x + y\right) - \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), z, y, t, y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (* (/ (- a z) t) y))))
  (if (<= t -3100000)
    t_1
    (if (<=
         t
         6499999999999999593644510990384774520498798802555127355660083857349028219105312768)
      (- (+ x y) (134-z0z1z2z3z4 (/ -1 (- t a)) z y t y))
      t_1))))
\begin{array}{l}
t_1 := x - \frac{a - z}{t} \cdot y\\
\mathbf{if}\;t \leq -3100000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6499999999999999593644510990384774520498798802555127355660083857349028219105312768:\\
\;\;\;\;\left(x + y\right) - \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), z, y, t, y\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1e6 or 6.4999999999999996e81 < t

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{a - z}{t} \cdot \color{blue}{y} \]
      6. lower-*.f6460.3%

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

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

    if -3.1e6 < t < 6.4999999999999996e81

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.4% accurate, 0.7× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3999999999999999e165 or 1.3799999999999999e136 < t

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{a - z}{t} \cdot \color{blue}{y} \]
      6. lower-*.f6460.3%

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

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

    if -1.3999999999999999e165 < t < 1.3799999999999999e136

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.1% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := x - \frac{a - z}{t} \cdot y\\ \mathbf{if}\;t \leq -3100000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 105000000000000008560894109403544066905437438919810482176:\\ \;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (* (/ (- a z) t) y))))
  (if (<= t -3100000)
    t_1
    (if (<=
         t
         105000000000000008560894109403544066905437438919810482176)
      (- (+ x y) (/ (* y z) (- a t)))
      t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((a - z) / t) * y);
	double tmp;
	if (t <= -3100000.0) {
		tmp = t_1;
	} else if (t <= 1.05e+56) {
		tmp = (x + y) - ((y * z) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (((a - z) / t) * y)
    if (t <= (-3100000.0d0)) then
        tmp = t_1
    else if (t <= 1.05d+56) then
        tmp = (x + y) - ((y * z) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((a - z) / t) * y);
	double tmp;
	if (t <= -3100000.0) {
		tmp = t_1;
	} else if (t <= 1.05e+56) {
		tmp = (x + y) - ((y * z) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((a - z) / t) * y)
	tmp = 0
	if t <= -3100000.0:
		tmp = t_1
	elif t <= 1.05e+56:
		tmp = (x + y) - ((y * z) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(a - z) / t) * y))
	tmp = 0.0
	if (t <= -3100000.0)
		tmp = t_1;
	elseif (t <= 1.05e+56)
		tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((a - z) / t) * y);
	tmp = 0.0;
	if (t <= -3100000.0)
		tmp = t_1;
	elseif (t <= 1.05e+56)
		tmp = (x + y) - ((y * z) / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3100000], t$95$1, If[LessEqual[t, 105000000000000008560894109403544066905437438919810482176], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{a - z}{t} \cdot y\\
\mathbf{if}\;t \leq -3100000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1e6 or 1.0500000000000001e56 < t

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{a - z}{t} \cdot \color{blue}{y} \]
      6. lower-*.f6460.3%

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

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

    if -3.1e6 < t < 1.0500000000000001e56

    1. Initial program 77.5%

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

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

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

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

Alternative 5: 87.1% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.1999999999999998e-61 or 6.4999999999999998e43 < a

    1. Initial program 77.5%

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

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

        \[\leadsto \left(x + y\right) - \frac{y \cdot z}{\color{blue}{a}} \]
      2. lower-*.f6464.3%

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

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

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

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

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

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

        \[\leadsto \left(x + y\right) - \frac{z}{a} \cdot \color{blue}{y} \]
      6. lower-/.f6466.1%

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

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

    if -4.1999999999999998e-61 < a < 6.4999999999999998e43

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Taylor expanded in z around inf

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

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

        \[\leadsto x - \frac{y \cdot z}{\color{blue}{a} - t} \]
      3. lower--.f6473.6%

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

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

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

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

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

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

        \[\leadsto x - \frac{z}{a - t} \cdot \color{blue}{y} \]
      6. lower-/.f6476.3%

        \[\leadsto x - \frac{z}{a - t} \cdot y \]
    11. Applied rewrites76.3%

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

Alternative 6: 86.4% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1200000000000001e-14 or 6.4999999999999998e43 < a

    1. Initial program 77.5%

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

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

        \[\leadsto \left(x + y\right) - \frac{y \cdot z}{\color{blue}{a}} \]
      2. lower-*.f6464.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.1200000000000001e-14 < a < 6.4999999999999998e43

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Taylor expanded in z around inf

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

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

        \[\leadsto x - \frac{y \cdot z}{\color{blue}{a} - t} \]
      3. lower--.f6473.6%

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

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

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

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

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

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

        \[\leadsto x - \frac{z}{a - t} \cdot \color{blue}{y} \]
      6. lower-/.f6476.3%

        \[\leadsto x - \frac{z}{a - t} \cdot y \]
    11. Applied rewrites76.3%

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

Alternative 7: 84.6% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8999999999999999e49 or 1.6000000000000001e219 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -1.8999999999999999e49 < a < 1.6000000000000001e219

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Taylor expanded in z around inf

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

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

        \[\leadsto x - \frac{y \cdot z}{\color{blue}{a} - t} \]
      3. lower--.f6473.6%

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

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

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

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

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

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

        \[\leadsto x - \frac{z}{a - t} \cdot \color{blue}{y} \]
      6. lower-/.f6476.3%

        \[\leadsto x - \frac{z}{a - t} \cdot y \]
    11. Applied rewrites76.3%

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

Alternative 8: 83.1% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := x - \left(-y\right)\\ \mathbf{if}\;a \leq -16000000000000000701533488721219157674144762429440:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728:\\ \;\;\;\;x - \frac{y}{a - t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (- y))))
  (if (<= a -16000000000000000701533488721219157674144762429440)
    t_1
    (if (<=
         a
         101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728)
      (- x (* (/ y (- a t)) z))
      t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - -y;
	double tmp;
	if (a <= -1.6e+49) {
		tmp = t_1;
	} else if (a <= 1.02e+110) {
		tmp = x - ((y / (a - t)) * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - -y
    if (a <= (-1.6d+49)) then
        tmp = t_1
    else if (a <= 1.02d+110) then
        tmp = x - ((y / (a - t)) * z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - -y;
	double tmp;
	if (a <= -1.6e+49) {
		tmp = t_1;
	} else if (a <= 1.02e+110) {
		tmp = x - ((y / (a - t)) * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - -y
	tmp = 0
	if a <= -1.6e+49:
		tmp = t_1
	elif a <= 1.02e+110:
		tmp = x - ((y / (a - t)) * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(-y))
	tmp = 0.0
	if (a <= -1.6e+49)
		tmp = t_1;
	elseif (a <= 1.02e+110)
		tmp = Float64(x - Float64(Float64(y / Float64(a - t)) * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - -y;
	tmp = 0.0;
	if (a <= -1.6e+49)
		tmp = t_1;
	elseif (a <= 1.02e+110)
		tmp = x - ((y / (a - t)) * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -16000000000000000701533488721219157674144762429440], t$95$1, If[LessEqual[a, 101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728], N[(x - N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -16000000000000000701533488721219157674144762429440:\\
\;\;\;\;t\_1\\

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6000000000000001e49 or 1.02e110 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -1.6000000000000001e49 < a < 1.02e110

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Taylor expanded in z around inf

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

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

        \[\leadsto x - \frac{y \cdot z}{\color{blue}{a} - t} \]
      3. lower--.f6473.6%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{a - t} \cdot z \]
      7. lower-/.f6476.2%

        \[\leadsto x - \frac{y}{a - t} \cdot z \]
    11. Applied rewrites76.2%

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

Alternative 9: 76.4% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.4000000000000003e-66 or 4.8000000000000004e128 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -2.4000000000000003e-66 < a < 4.8000000000000004e128

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{a - z}{t} \cdot \color{blue}{y} \]
      6. lower-*.f6460.3%

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

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

Alternative 10: 76.2% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8000000000000004e-68 or 4.8000000000000004e128 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -6.8000000000000004e-68 < a < 4.8000000000000004e128

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

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

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

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

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

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

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

Alternative 11: 76.2% accurate, 0.9× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7199999999999999e-15 or 6.0000000000000005e107 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -1.7199999999999999e-15 < a < 6.0000000000000005e107

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

        \[\leadsto x + \frac{y \cdot z}{t} \]
      2. lower-*.f6460.2%

        \[\leadsto x + \frac{y \cdot z}{t} \]
    7. Applied rewrites60.2%

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

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

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

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

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

        \[\leadsto x + \frac{z}{t} \cdot y \]
      6. lower-/.f6461.4%

        \[\leadsto x + \frac{z}{t} \cdot y \]
    9. Applied rewrites61.4%

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

Alternative 12: 75.9% accurate, 0.9× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7199999999999999e-15 or 6.0000000000000005e107 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if -1.7199999999999999e-15 < a < 6.0000000000000005e107

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

        \[\leadsto x + \frac{y \cdot z}{t} \]
      2. lower-*.f6460.2%

        \[\leadsto x + \frac{y \cdot z}{t} \]
    7. Applied rewrites60.2%

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

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

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

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

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

        \[\leadsto x + z \cdot \frac{y}{\color{blue}{t}} \]
      6. lower-/.f6461.1%

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

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

Alternative 13: 64.3% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \frac{y \cdot z}{t - a}\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\ \;\;\;\;x - \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (/ (* y z) (- t a)))
       (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
  (if (<= t_2 (- INFINITY))
    t_1
    (if (<=
         t_2
         1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208)
      (- x (- y))
      t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * z) / (t - a);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 1e+306) {
		tmp = x - -y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * z) / (t - a);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= 1e+306) {
		tmp = x - -y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * z) / (t - a)
	t_2 = (x + y) - (((z - t) * y) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= 1e+306:
		tmp = x - -y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * z) / Float64(t - a))
	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 1e+306)
		tmp = Float64(x - Float64(-y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * z) / (t - a);
	t_2 = (x + y) - (((z - t) * y) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= 1e+306)
		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[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208], N[(x - (-y)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \frac{y \cdot z}{t - a}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\
\;\;\;\;x - \left(-y\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or 1e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), \left(t - z\right), y, \left(t - a\right), \left(y + x\right)\right)} \]
    4. Taylor expanded in z around inf

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1e306

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 61.2% accurate, 0.6× speedup?

\[\begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\ \;\;\;\;x - \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (if (<=
     (- (+ x y) (/ (* (- z t) y) (- a t)))
     1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208)
  (- x (- y))
  (/ (* y z) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306) {
		tmp = x - -y;
	} else {
		tmp = (y * z) / t;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (((x + y) - (((z - t) * y) / (a - t))) <= 1d+306) then
        tmp = x - -y
    else
        tmp = (y * z) / t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306) {
		tmp = x - -y;
	} else {
		tmp = (y * z) / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if ((x + y) - (((z - t) * y) / (a - t))) <= 1e+306:
		tmp = x - -y
	else:
		tmp = (y * z) / t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) <= 1e+306)
		tmp = Float64(x - Float64(-y));
	else
		tmp = Float64(Float64(y * z) / t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306)
		tmp = x - -y;
	else
		tmp = (y * z) / t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208], N[(x - (-y)), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\
\;\;\;\;x - \left(-y\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\


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

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    5. Step-by-step derivation
      1. lower-*.f6460.2%

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
    6. Applied rewrites60.2%

      \[\leadsto x - \color{blue}{-1 \cdot y} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - -1 \cdot \color{blue}{y} \]
      2. mul-1-negN/A

        \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
      3. lower-neg.f6460.2%

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites60.2%

      \[\leadsto x - \left(-y\right) \]

    if 1e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
      6. lower-*.f6457.6%

        \[\leadsto x + -1 \cdot \frac{a \cdot y - y \cdot z}{t} \]
    4. Applied rewrites57.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{\color{blue}{t}} \]
      10. lift-/.f6457.6%

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

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

        \[\leadsto x - \frac{a \cdot y - y \cdot z}{t} \]
      13. lift-*.f64N/A

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

        \[\leadsto x - \frac{a \cdot y - z \cdot y}{t} \]
      15. distribute-rgt-out--N/A

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

        \[\leadsto x - \frac{y \cdot \left(a - z\right)}{t} \]
      17. lower--.f6457.9%

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

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

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

        \[\leadsto \frac{y \cdot z}{t} \]
      2. lower-*.f6418.8%

        \[\leadsto \frac{y \cdot z}{t} \]
    9. Applied rewrites18.8%

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

Alternative 15: 60.2% accurate, 4.8× speedup?

\[x - \left(-y\right) \]
(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 - Float64(-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 - \left(-y\right)
Derivation
  1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x - \color{blue}{-1 \cdot y} \]
  5. Step-by-step derivation
    1. lower-*.f6460.2%

      \[\leadsto x - -1 \cdot \color{blue}{y} \]
  6. Applied rewrites60.2%

    \[\leadsto x - \color{blue}{-1 \cdot y} \]
  7. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto x - -1 \cdot \color{blue}{y} \]
    2. mul-1-negN/A

      \[\leadsto x - \left(\mathsf{neg}\left(y\right)\right) \]
    3. lower-neg.f6460.2%

      \[\leadsto x - \left(-y\right) \]
  8. Applied rewrites60.2%

    \[\leadsto x - \left(-y\right) \]
  9. Add Preprocessing

Reproduce

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