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

Percentage Accurate: 85.3% → 98.0%
Time: 4.0s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Initial Program: 85.3% accurate, 1.0× speedup?

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

Alternative 1: 98.0% accurate, 1.0× speedup?

\[\mathsf{fma}\left(\frac{t - z}{t - a}, y, x\right) \]
(FPCore (x y z t a)
  :precision binary64
  (fma (/ (- t z) (- t a)) y x))
double code(double x, double y, double z, double t, double a) {
	return fma(((t - z) / (t - a)), y, x);
}
function code(x, y, z, t, a)
	return fma(Float64(Float64(t - z) / Float64(t - a)), y, x)
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\mathsf{fma}\left(\frac{t - z}{t - a}, y, x\right)
Derivation
  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
    18. lower--.f6498.0%

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

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

Alternative 2: 95.7% accurate, 1.0× speedup?

\[\mathsf{fma}\left(\frac{y}{t - a}, t - z, x\right) \]
(FPCore (x y z t a)
  :precision binary64
  (fma (/ y (- t a)) (- t z) x))
double code(double x, double y, double z, double t, double a) {
	return fma((y / (t - a)), (t - z), x);
}
function code(x, y, z, t, a)
	return fma(Float64(y / Float64(t - a)), Float64(t - z), x)
end
code[x_, y_, z_, t_, a_] := N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]
\mathsf{fma}\left(\frac{y}{t - a}, t - z, x\right)
Derivation
  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{t - a}}, t - z, x\right) \]
    20. lower--.f6495.7%

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

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

Alternative 3: 86.2% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1500000000000001e87 or 5.2000000000000003e-21 < t

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
      18. lower--.f6498.0%

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

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
    5. Step-by-step derivation
      1. Applied rewrites71.1%

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

      if -1.1500000000000001e87 < t < 5.2000000000000003e-21

      1. Initial program 85.3%

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

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

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

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

    Alternative 4: 83.4% accurate, 0.8× speedup?

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

      1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
        18. lower--.f6498.0%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
      5. Step-by-step derivation
        1. Applied rewrites71.1%

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

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

            \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t}}, y, x\right) \]
          2. lower--.f6467.2%

            \[\leadsto \mathsf{fma}\left(\frac{t - z}{t}, y, x\right) \]
        4. Applied rewrites67.2%

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

        if -3.0000000000000001e-61 < t < 8.9999999999999994e-21

        1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 8.9999999999999994e-21 < t

          1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
            18. lower--.f6498.0%

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites71.1%

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

          Alternative 5: 82.5% accurate, 0.8× speedup?

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

            1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
              18. lower--.f6498.0%

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

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

              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
            5. Step-by-step derivation
              1. Applied rewrites71.1%

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t}}, y, x\right) \]
                2. lower--.f6467.2%

                  \[\leadsto \mathsf{fma}\left(\frac{t - z}{t}, y, x\right) \]
              4. Applied rewrites67.2%

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

              if -2.7e10 < t < 5.4999999999999998e-21

              1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                18. lower--.f6498.0%

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
              5. Step-by-step derivation
                1. Applied rewrites71.1%

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
                3. Step-by-step derivation
                  1. lower-/.f6461.9%

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

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

                if 5.4999999999999998e-21 < t

                1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                  18. lower--.f6498.0%

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                5. Step-by-step derivation
                  1. Applied rewrites71.1%

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

                Alternative 6: 82.2% accurate, 0.8× speedup?

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

                  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                    18. lower--.f6498.0%

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                  5. Step-by-step derivation
                    1. Applied rewrites71.1%

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t}}, y, x\right) \]
                      2. lower--.f6467.2%

                        \[\leadsto \mathsf{fma}\left(\frac{t - z}{t}, y, x\right) \]
                    4. Applied rewrites67.2%

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

                    if -2.7e10 < t < 5.4999999999999998e-21

                    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                      18. lower--.f6498.0%

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                    5. Step-by-step derivation
                      1. Applied rewrites71.1%

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
                      3. Step-by-step derivation
                        1. lower-/.f6461.9%

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

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

                      if 5.4999999999999998e-21 < t

                      1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                        18. lower--.f6498.0%

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                      5. Step-by-step derivation
                        1. Applied rewrites71.1%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{y}{t - a} \cdot t + \color{blue}{x} \]
                          10. lower-fma.f6469.9%

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

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

                      Alternative 7: 81.4% accurate, 0.8× speedup?

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

                        1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                          18. lower--.f6498.0%

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                        5. Step-by-step derivation
                          1. Applied rewrites71.1%

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t}}, y, x\right) \]
                            2. lower--.f6467.2%

                              \[\leadsto \mathsf{fma}\left(\frac{t - z}{t}, y, x\right) \]
                          4. Applied rewrites67.2%

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

                          if -2.7e10 < t < 2.3999999999999999e-18

                          1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                            18. lower--.f6498.0%

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                          5. Step-by-step derivation
                            1. Applied rewrites71.1%

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

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
                            3. Step-by-step derivation
                              1. lower-/.f6461.9%

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

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

                          Alternative 8: 76.7% accurate, 0.9× speedup?

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

                            1. Initial program 85.3%

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

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

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

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

                            if -3.7e92 < t < 3.6000000000000001e-19

                            1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{t - a}}, y, x\right) \]
                              18. lower--.f6498.0%

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t}}{t - a}, y, x\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites71.1%

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

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
                              3. Step-by-step derivation
                                1. lower-/.f6461.9%

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

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

                            Alternative 9: 60.6% accurate, 1.0× speedup?

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

                              1. Initial program 85.3%

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

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

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

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

                              if 8.7999999999999995e-272 < t < 2.3000000000000002e-50

                              1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{y}{a - t} \cdot z \]
                                9. lift--.f6429.1%

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

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

                                \[\leadsto \frac{y}{a} \cdot z \]
                              11. Step-by-step derivation
                                1. Applied rewrites20.3%

                                  \[\leadsto \frac{y}{a} \cdot z \]
                              12. Recombined 2 regimes into one program.
                              13. Add Preprocessing

                              Alternative 10: 58.5% accurate, 1.0× speedup?

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

                                1. Initial program 85.3%

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

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

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

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

                                if 8.7999999999999995e-272 < t < 2.3000000000000002e-50

                                1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{y \cdot z}{a} \]
                                10. Applied rewrites18.8%

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

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

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

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

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

                                    \[\leadsto \frac{z}{a} \cdot y \]
                                  6. lower-/.f6420.4%

                                    \[\leadsto \frac{z}{a} \cdot y \]
                                12. Applied rewrites20.4%

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

                              Alternative 11: 58.4% accurate, 4.3× speedup?

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

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

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

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

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

                              Alternative 12: 19.2% accurate, 15.6× speedup?

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

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

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

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

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

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

                                  \[\leadsto y \]
                                2. Add Preprocessing

                                Reproduce

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