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

Percentage Accurate: 76.5% → 91.2%
Time: 4.3s
Alternatives: 13
Speedup: 0.9×

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

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

Initial Program: 76.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: 91.2% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - a, \frac{y}{t}, x\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7500000000000001e144

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{a - z}{t}\right), \color{blue}{y}, x\right) \]
      10. distribute-neg-fracN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - a}{t}, y, x\right) \]
      14. lower--.f6460.8%

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

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

    if -2.7500000000000001e144 < t < 5.0000000000000003e83

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

    if 5.0000000000000003e83 < t

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - a, \frac{y}{\color{blue}{t}}, x\right) \]
      15. lower-/.f6461.8%

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

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

Alternative 2: 89.2% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - a, \frac{y}{t}, x\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7500000000000001e144

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{a - z}{t}\right), \color{blue}{y}, x\right) \]
      10. distribute-neg-fracN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - a}{t}, y, x\right) \]
      14. lower--.f6460.8%

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

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

    if -2.7500000000000001e144 < t < 2.6999999999999998e-12

    1. Initial program 76.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a - t}}, t - z, y\right) + x \]
      17. lower--.f6482.6%

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

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

    if 2.6999999999999998e-12 < t

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - a, \frac{y}{\color{blue}{t}}, x\right) \]
      15. lower-/.f6461.8%

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

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

Alternative 3: 87.0% accurate, 0.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - a, \frac{y}{t}, x\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7500000000000001e144

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{a - z}{t}\right), \color{blue}{y}, x\right) \]
      10. distribute-neg-fracN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - a}{t}, y, x\right) \]
      14. lower--.f6460.8%

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

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

    if -2.7500000000000001e144 < t < 2.6999999999999998e-12

    1. Initial program 76.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-*.f6477.6%

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

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

    if 2.6999999999999998e-12 < t

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - a, \frac{y}{\color{blue}{t}}, x\right) \]
      15. lower-/.f6461.8%

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

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

Alternative 4: 82.6% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - a, \frac{y}{t}, x\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.5999999999999998e-6

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{a - z}{t}\right), \color{blue}{y}, x\right) \]
      10. distribute-neg-fracN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - a}{t}, y, x\right) \]
      14. lower--.f6460.8%

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

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

    if -3.5999999999999998e-6 < t < 2.6999999999999998e-12

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

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

      \[\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 2.6999999999999998e-12 < t

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - a, \frac{y}{\color{blue}{t}}, x\right) \]
      15. lower-/.f6461.8%

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

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

Alternative 5: 78.1% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := x - \left(-y\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(z - a, \frac{y}{t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (- y))))
  (if (<= a -2.3e-15)
    t_1
    (if (<= a 9.8e+88) (fma (- z a) (/ y t) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - -y;
	double tmp;
	if (a <= -2.3e-15) {
		tmp = t_1;
	} else if (a <= 9.8e+88) {
		tmp = fma((z - a), (y / t), x);
	} 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.3e-15)
		tmp = t_1;
	elseif (a <= 9.8e+88)
		tmp = fma(Float64(z - a), Float64(y / t), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -2.3e-15], t$95$1, If[LessEqual[a, 9.8e+88], N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2999999999999999e-15 or 9.8000000000000005e88 < a

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -2.2999999999999999e-15 < a < 9.8000000000000005e88

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - a, \frac{y}{\color{blue}{t}}, x\right) \]
      15. lower-/.f6461.8%

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

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

Alternative 6: 77.8% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := x - \left(-y\right)\\ \mathbf{if}\;a \leq -740000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - a}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (- y))))
  (if (<= a -740000.0)
    t_1
    (if (<= a 9.8e+88) (fma (/ (- z a) t) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - -y;
	double tmp;
	if (a <= -740000.0) {
		tmp = t_1;
	} else if (a <= 9.8e+88) {
		tmp = fma(((z - a) / t), y, x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(-y))
	tmp = 0.0
	if (a <= -740000.0)
		tmp = t_1;
	elseif (a <= 9.8e+88)
		tmp = fma(Float64(Float64(z - a) / t), y, x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -740000.0], t$95$1, If[LessEqual[a, 9.8e+88], N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -740000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.4e5 or 9.8000000000000005e88 < a

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -7.4e5 < a < 9.8000000000000005e88

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{a - z}{t}\right), \color{blue}{y}, x\right) \]
      10. distribute-neg-fracN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z - a}{t}, y, x\right) \]
      14. lower--.f6460.8%

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

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

Alternative 7: 75.0% accurate, 1.0× speedup?

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

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - -y
    if (a <= (-16000000.0d0)) then
        tmp = t_1
    else if (a <= 3.8d+94) then
        tmp = x + ((y * z) / t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - -y;
	double tmp;
	if (a <= -16000000.0) {
		tmp = t_1;
	} else if (a <= 3.8e+94) {
		tmp = x + ((y * z) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - -y
	tmp = 0
	if a <= -16000000.0:
		tmp = t_1
	elif a <= 3.8e+94:
		tmp = x + ((y * z) / 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 <= -16000000.0)
		tmp = t_1;
	elseif (a <= 3.8e+94)
		tmp = Float64(x + Float64(Float64(y * z) / 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 <= -16000000.0)
		tmp = t_1;
	elseif (a <= 3.8e+94)
		tmp = x + ((y * z) / 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, -16000000.0], t$95$1, If[LessEqual[a, 3.8e+94], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -16000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+94}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6e7 or 3.7999999999999996e94 < a

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -1.6e7 < a < 3.7999999999999996e94

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

Alternative 8: 71.2% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t - a} \cdot \left(z - t\right) + \left(x + y\right)} \]
      16. lower-fma.f6482.6%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{t - a}, z - t, \color{blue}{y + x}\right) \]
      19. lower-+.f6482.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    7. 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}} \]
    8. Applied rewrites26.8%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    9. Step-by-step derivation
      1. +-commutative26.8%

        \[\leadsto \frac{\color{blue}{y \cdot z}}{t - a} \]
      2. +-commutative26.8%

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

        \[\leadsto \frac{\color{blue}{y} \cdot z}{t - a} \]
      4. fp-cancel-sign-sub-invN/A

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

        \[\leadsto \frac{y \cdot z}{t - a} \]
      6. distribute-frac-neg2N/A

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{z}}{t - a} \]
      11. lift-+.f6426.8%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{t - \color{blue}{a}} \]
      19. lower-/.f6429.0%

        \[\leadsto z \cdot \frac{y}{\color{blue}{t - a}} \]
    10. Applied rewrites29.0%

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.0000000000000001e-293 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e306

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -2.0000000000000001e-293 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(z - a\right) \cdot y}{t} \]
    11. Applied rewrites22.8%

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

Alternative 9: 71.0% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t - a} \cdot \left(z - t\right) + \left(x + y\right)} \]
      16. lower-fma.f6482.6%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{t - a}, z - t, \color{blue}{y + x}\right) \]
      19. lower-+.f6482.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    7. 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}} \]
    8. Applied rewrites26.8%

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.0000000000000001e-293 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e306

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -2.0000000000000001e-293 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(z - a\right) \cdot y}{t} \]
    11. Applied rewrites22.8%

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

Alternative 10: 71.0% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t - a} \cdot \left(z - t\right) + \left(x + y\right)} \]
      16. lower-fma.f6482.6%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{t - a}, z - t, \color{blue}{y + x}\right) \]
      19. lower-+.f6482.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    7. 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}} \]
    8. Applied rewrites26.8%

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.0000000000000001e-293 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e306

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -2.0000000000000001e-293 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 76.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-*.f6458.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z - a}{t} \cdot y \]
      9. lower--.f6425.3%

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

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

Alternative 11: 70.0% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := \frac{z}{t - a} \cdot y\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ t_3 := x - \left(-y\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-195}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-199}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (* (/ z (- t a)) y))
       (t_2 (- (+ x y) (/ (* (- z t) y) (- a t))))
       (t_3 (- x (- y))))
  (if (<= t_2 (- INFINITY))
    t_1
    (if (<= t_2 -2e-195)
      t_3
      (if (<= t_2 2e-199) (* 1.0 x) (if (<= t_2 2e+306) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / (t - a)) * y;
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double t_3 = x - -y;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-195) {
		tmp = t_3;
	} else if (t_2 <= 2e-199) {
		tmp = 1.0 * x;
	} else if (t_2 <= 2e+306) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / (t - a)) * y;
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double t_3 = x - -y;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-195) {
		tmp = t_3;
	} else if (t_2 <= 2e-199) {
		tmp = 1.0 * x;
	} else if (t_2 <= 2e+306) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z / (t - a)) * y
	t_2 = (x + y) - (((z - t) * y) / (a - t))
	t_3 = x - -y
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-195:
		tmp = t_3
	elif t_2 <= 2e-199:
		tmp = 1.0 * x
	elif t_2 <= 2e+306:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z / Float64(t - a)) * y)
	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
	t_3 = Float64(x - Float64(-y))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-195)
		tmp = t_3;
	elseif (t_2 <= 2e-199)
		tmp = Float64(1.0 * x);
	elseif (t_2 <= 2e+306)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z / (t - a)) * y;
	t_2 = (x + y) - (((z - t) * y) / (a - t));
	t_3 = x - -y;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-195)
		tmp = t_3;
	elseif (t_2 <= 2e-199)
		tmp = 1.0 * x;
	elseif (t_2 <= 2e+306)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-195], t$95$3, If[LessEqual[t$95$2, 2e-199], N[(1.0 * x), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
t_1 := \frac{z}{t - a} \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
t_3 := x - \left(-y\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-195}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-199}:\\
\;\;\;\;1 \cdot x\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t - a} \cdot \left(z - t\right) + \left(x + y\right)} \]
      16. lower-fma.f6482.6%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{t - a}, z - t, \color{blue}{y + x}\right) \]
      19. lower-+.f6482.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t - a}} \]
    7. 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}} \]
    8. Applied rewrites26.8%

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.0000000000000002e-195 or 2e-199 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e306

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto x - \left(-y\right) \]
    8. Applied rewrites59.4%

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

    if -2.0000000000000002e-195 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e-199

    1. Initial program 76.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. sub-negate-revN/A

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

        \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

        \[\leadsto \color{blue}{x - -1 \cdot y} \]
      2. sub-to-multN/A

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

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

        \[\leadsto \color{blue}{\left(1 - \frac{-1 \cdot y}{x}\right)} \cdot x \]
      5. lower-unsound-/.f6456.8%

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

        \[\leadsto \left(1 - \frac{-1 \cdot \color{blue}{y}}{x}\right) \cdot x \]
      7. mul-1-negN/A

        \[\leadsto \left(1 - \frac{\mathsf{neg}\left(y\right)}{x}\right) \cdot x \]
      8. lower-neg.f6456.8%

        \[\leadsto \left(1 - \frac{-y}{x}\right) \cdot x \]
    8. Applied rewrites56.8%

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

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

        \[\leadsto \color{blue}{1} \cdot x \]
    11. Recombined 3 regimes into one program.
    12. Add Preprocessing

    Alternative 12: 61.9% accurate, 1.5× speedup?

    \[\begin{array}{l} t_1 := x - \left(-y\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{-73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+92}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (let* ((t_1 (- x (- y))))
      (if (<= a -3.5e-73) t_1 (if (<= a 2e+92) (* 1.0 x) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x - -y;
    	double tmp;
    	if (a <= -3.5e-73) {
    		tmp = t_1;
    	} else if (a <= 2e+92) {
    		tmp = 1.0 * x;
    	} 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 <= (-3.5d-73)) then
            tmp = t_1
        else if (a <= 2d+92) then
            tmp = 1.0d0 * x
        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 <= -3.5e-73) {
    		tmp = t_1;
    	} else if (a <= 2e+92) {
    		tmp = 1.0 * x;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x - -y
    	tmp = 0
    	if a <= -3.5e-73:
    		tmp = t_1
    	elif a <= 2e+92:
    		tmp = 1.0 * x
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x - Float64(-y))
    	tmp = 0.0
    	if (a <= -3.5e-73)
    		tmp = t_1;
    	elseif (a <= 2e+92)
    		tmp = Float64(1.0 * x);
    	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 <= -3.5e-73)
    		tmp = t_1;
    	elseif (a <= 2e+92)
    		tmp = 1.0 * x;
    	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, -3.5e-73], t$95$1, If[LessEqual[a, 2e+92], N[(1.0 * x), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := x - \left(-y\right)\\
    \mathbf{if}\;a \leq -3.5 \cdot 10^{-73}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 2 \cdot 10^{+92}:\\
    \;\;\;\;1 \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -3.4999999999999998e-73 or 2.0000000000000001e92 < a

      1. Initial program 76.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. sub-negate-revN/A

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

          \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

          \[\leadsto x - \left(-y\right) \]
      8. Applied rewrites59.4%

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

      if -3.4999999999999998e-73 < a < 2.0000000000000001e92

      1. Initial program 76.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. sub-negate-revN/A

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

          \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

          \[\leadsto \color{blue}{x - -1 \cdot y} \]
        2. sub-to-multN/A

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

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

          \[\leadsto \color{blue}{\left(1 - \frac{-1 \cdot y}{x}\right)} \cdot x \]
        5. lower-unsound-/.f6456.8%

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

          \[\leadsto \left(1 - \frac{-1 \cdot \color{blue}{y}}{x}\right) \cdot x \]
        7. mul-1-negN/A

          \[\leadsto \left(1 - \frac{\mathsf{neg}\left(y\right)}{x}\right) \cdot x \]
        8. lower-neg.f6456.8%

          \[\leadsto \left(1 - \frac{-y}{x}\right) \cdot x \]
      8. Applied rewrites56.8%

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

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

          \[\leadsto \color{blue}{1} \cdot x \]
      11. Recombined 2 regimes into one program.
      12. Add Preprocessing

      Alternative 13: 50.7% accurate, 4.6× speedup?

      \[1 \cdot x \]
      (FPCore (x y z t a)
        :precision binary64
        (* 1.0 x))
      double code(double x, double y, double z, double t, double a) {
      	return 1.0 * x;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          code = 1.0d0 * x
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	return 1.0 * x;
      }
      
      def code(x, y, z, t, a):
      	return 1.0 * x
      
      function code(x, y, z, t, a)
      	return Float64(1.0 * x)
      end
      
      function tmp = code(x, y, z, t, a)
      	tmp = 1.0 * x;
      end
      
      code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
      
      1 \cdot x
      
      Derivation
      1. Initial program 76.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. sub-negate-revN/A

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

          \[\leadsto \color{blue}{x - \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--.f6479.6%

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

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

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

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

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

          \[\leadsto \color{blue}{x - -1 \cdot y} \]
        2. sub-to-multN/A

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

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

          \[\leadsto \color{blue}{\left(1 - \frac{-1 \cdot y}{x}\right)} \cdot x \]
        5. lower-unsound-/.f6456.8%

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

          \[\leadsto \left(1 - \frac{-1 \cdot \color{blue}{y}}{x}\right) \cdot x \]
        7. mul-1-negN/A

          \[\leadsto \left(1 - \frac{\mathsf{neg}\left(y\right)}{x}\right) \cdot x \]
        8. lower-neg.f6456.8%

          \[\leadsto \left(1 - \frac{-y}{x}\right) \cdot x \]
      8. Applied rewrites56.8%

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

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

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

        Reproduce

        ?
        herbie shell --seed 2025212 
        (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))))