Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A

Percentage Accurate: 99.8% → 99.9%
Time: 13.1s
Alternatives: 19
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

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 19 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: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ y + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, x\right)\right) \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (+ y (fma z (- 1.0 (log t)) (fma b (+ a -0.5) x))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return y + fma(z, (1.0 - log(t)), fma(b, (a + -0.5), x));
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(y + fma(z, Float64(1.0 - log(t)), fma(b, Float64(a + -0.5), x)))
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
y + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, x\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
  4. Step-by-step derivation
    1. associate-+r+N/A

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

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

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

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

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

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

      \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
    8. cancel-sign-sub-invN/A

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

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

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

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

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

      \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
    14. associate-+r+N/A

      \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
  5. Simplified99.9%

    \[\leadsto \color{blue}{y + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, x\right)\right)} \]
  6. Add Preprocessing

Alternative 2: 92.7% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+118}:\\ \;\;\;\;x + \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(z, 1 - \log t, y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))) (t_2 (+ y (fma b (+ a -0.5) x))))
   (if (<= t_1 -1e+158)
     t_2
     (if (<= t_1 2e+118) (+ x (fma b -0.5 (fma z (- 1.0 (log t)) y))) t_2))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double t_2 = y + fma(b, (a + -0.5), x);
	double tmp;
	if (t_1 <= -1e+158) {
		tmp = t_2;
	} else if (t_1 <= 2e+118) {
		tmp = x + fma(b, -0.5, fma(z, (1.0 - log(t)), y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	t_2 = Float64(y + fma(b, Float64(a + -0.5), x))
	tmp = 0.0
	if (t_1 <= -1e+158)
		tmp = t_2;
	elseif (t_1 <= 2e+118)
		tmp = Float64(x + fma(b, -0.5, fma(z, Float64(1.0 - log(t)), y)));
	else
		tmp = t_2;
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+158], t$95$2, If[LessEqual[t$95$1, 2e+118], N[(x + N[(b * -0.5 + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+158}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;x + \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(z, 1 - \log t, y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.99999999999999953e157 or 1.99999999999999993e118 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

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

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

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

        \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
      5. sub-negN/A

        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
      6. metadata-evalN/A

        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
      7. +-lowering-+.f6495.1

        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
    5. Simplified95.1%

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

    if -9.99999999999999953e157 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999993e118

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

        \[\leadsto \color{blue}{x + \left(\left(y + \left(z + \frac{-1}{2} \cdot b\right)\right) - z \cdot \log t\right)} \]
      3. associate-+r+N/A

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

        \[\leadsto x + \left(\color{blue}{\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right)} - z \cdot \log t\right) \]
      5. remove-double-negN/A

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

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

        \[\leadsto x + \left(\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right) - \color{blue}{\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto x + \left(\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)}\right) \]
      9. associate--l+N/A

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

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

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

        \[\leadsto x + \left(b \cdot \frac{-1}{2} + \left(\left(y + z\right) - \color{blue}{z \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right)}\right)\right) \]
      13. log-recN/A

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

        \[\leadsto x + \left(b \cdot \frac{-1}{2} + \left(\left(y + z\right) - z \cdot \color{blue}{\log t}\right)\right) \]
      15. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \color{blue}{\mathsf{fma}\left(b, \frac{-1}{2}, \left(y + z\right) - z \cdot \log t\right)} \]
      16. cancel-sign-sub-invN/A

        \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{\left(y + z\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t}\right) \]
      17. associate-+l+N/A

        \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{y + \left(z + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t\right)}\right) \]
      18. cancel-sign-sub-invN/A

        \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, y + \color{blue}{\left(z - z \cdot \log t\right)}\right) \]
    5. Simplified93.9%

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(z, 1 - \log t, y\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+158}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+118}:\\ \;\;\;\;x + \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(z, 1 - \log t, y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+109}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - \log t, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))) (t_2 (+ y (fma b (+ a -0.5) x))))
   (if (<= t_1 -4e+109)
     t_2
     (if (<= t_1 2e+118) (fma z (- 1.0 (log t)) (+ y x)) t_2))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double t_2 = y + fma(b, (a + -0.5), x);
	double tmp;
	if (t_1 <= -4e+109) {
		tmp = t_2;
	} else if (t_1 <= 2e+118) {
		tmp = fma(z, (1.0 - log(t)), (y + x));
	} else {
		tmp = t_2;
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	t_2 = Float64(y + fma(b, Float64(a + -0.5), x))
	tmp = 0.0
	if (t_1 <= -4e+109)
		tmp = t_2;
	elseif (t_1 <= 2e+118)
		tmp = fma(z, Float64(1.0 - log(t)), Float64(y + x));
	else
		tmp = t_2;
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+109], t$95$2, If[LessEqual[t$95$1, 2e+118], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+109}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - \log t, y + x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -3.99999999999999993e109 or 1.99999999999999993e118 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

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

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

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

        \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
      5. sub-negN/A

        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
      6. metadata-evalN/A

        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
      7. +-lowering-+.f6493.3

        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
    5. Simplified93.3%

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

    if -3.99999999999999993e109 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999993e118

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t} \]
      2. associate-+r+N/A

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

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

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

        \[\leadsto \left(x + y\right) + \left(\color{blue}{z \cdot 1} - z \cdot \log t\right) \]
      6. distribute-lft-out--N/A

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

        \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right) + \left(x + y\right)} \]
      8. sub-negN/A

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

        \[\leadsto z \cdot \left(1 + \color{blue}{-1 \cdot \log t}\right) + \left(x + y\right) \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, 1 + -1 \cdot \log t, x + y\right)} \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(z, 1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}, x + y\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - \log t}, x + y\right) \]
      13. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - \log t}, x + y\right) \]
      14. log-lowering-log.f64N/A

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

        \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{y + x}\right) \]
      16. +-lowering-+.f6490.7

        \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{y + x}\right) \]
    5. Simplified90.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, 1 - \log t, y + x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4 \cdot 10^{+109}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - \log t, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 41.4% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) + \left(\left(z + \left(y + x\right)\right) - z \cdot \log t\right) \leq -5 \cdot 10^{-151}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (+ (* b (- a 0.5)) (- (+ z (+ y x)) (* z (log t)))) -5e-151) x y))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (((b * (a - 0.5)) + ((z + (y + x)) - (z * log(t)))) <= -5e-151) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (((b * (a - 0.5d0)) + ((z + (y + x)) - (z * log(t)))) <= (-5d-151)) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (((b * (a - 0.5)) + ((z + (y + x)) - (z * Math.log(t)))) <= -5e-151) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if ((b * (a - 0.5)) + ((z + (y + x)) - (z * math.log(t)))) <= -5e-151:
		tmp = x
	else:
		tmp = y
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(Float64(b * Float64(a - 0.5)) + Float64(Float64(z + Float64(y + x)) - Float64(z * log(t)))) <= -5e-151)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (((b * (a - 0.5)) + ((z + (y + x)) - (z * log(t)))) <= -5e-151)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-151], x, y]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot \left(a - 0.5\right) + \left(\left(z + \left(y + x\right)\right) - z \cdot \log t\right) \leq -5 \cdot 10^{-151}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -5.00000000000000003e-151

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Simplified16.5%

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

      if -5.00000000000000003e-151 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

      1. Initial program 99.9%

        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{y} \]
      4. Step-by-step derivation
        1. Simplified19.9%

          \[\leadsto \color{blue}{y} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification18.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) + \left(\left(z + \left(y + x\right)\right) - z \cdot \log t\right) \leq -5 \cdot 10^{-151}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
      7. Add Preprocessing

      Alternative 5: 77.9% accurate, 1.0× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;\left(z + \left(y + x\right)\right) - z \cdot \log t \leq -1 \cdot 10^{-151}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, y\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= (- (+ z (+ y x)) (* z (log t))) -1e-151)
         (fma b (+ a -0.5) x)
         (fma b (+ a -0.5) y)))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (((z + (y + x)) - (z * log(t))) <= -1e-151) {
      		tmp = fma(b, (a + -0.5), x);
      	} else {
      		tmp = fma(b, (a + -0.5), y);
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (Float64(Float64(z + Float64(y + x)) - Float64(z * log(t))) <= -1e-151)
      		tmp = fma(b, Float64(a + -0.5), x);
      	else
      		tmp = fma(b, Float64(a + -0.5), y);
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-151], N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision], N[(b * N[(a + -0.5), $MachinePrecision] + y), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;\left(z + \left(y + x\right)\right) - z \cdot \log t \leq -1 \cdot 10^{-151}:\\
      \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(b, a + -0.5, y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < -9.9999999999999994e-152

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6478.7

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified78.7%

          \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
        6. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x + b \cdot \left(a - \frac{1}{2}\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + x} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          3. sub-negN/A

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          5. +-lowering-+.f6456.1

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        8. Simplified56.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]

        if -9.9999999999999994e-152 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6483.7

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified83.7%

          \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{y + b \cdot \left(a - \frac{1}{2}\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + y} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, y\right)} \]
          3. sub-negN/A

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, y\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, y\right) \]
          5. +-lowering-+.f6461.4

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, y\right) \]
        8. Simplified61.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, y\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification58.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(z + \left(y + x\right)\right) - z \cdot \log t \leq -1 \cdot 10^{-151}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, y\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 86.1% accurate, 1.0× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := y + \mathsf{fma}\left(\log t, -z, z\right)\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+158}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+180}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ y (fma (log t) (- z) z))))
         (if (<= z -4.5e+158)
           t_1
           (if (<= z 1.55e+180) (+ y (fma b (+ a -0.5) x)) t_1))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y + fma(log(t), -z, z);
      	double tmp;
      	if (z <= -4.5e+158) {
      		tmp = t_1;
      	} else if (z <= 1.55e+180) {
      		tmp = y + fma(b, (a + -0.5), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	t_1 = Float64(y + fma(log(t), Float64(-z), z))
      	tmp = 0.0
      	if (z <= -4.5e+158)
      		tmp = t_1;
      	elseif (z <= 1.55e+180)
      		tmp = Float64(y + fma(b, Float64(a + -0.5), x));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(N[Log[t], $MachinePrecision] * (-z) + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+158], t$95$1, If[LessEqual[z, 1.55e+180], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      t_1 := y + \mathsf{fma}\left(\log t, -z, z\right)\\
      \mathbf{if}\;z \leq -4.5 \cdot 10^{+158}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 1.55 \cdot 10^{+180}:\\
      \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.50000000000000046e158 or 1.54999999999999999e180 < z

        1. Initial program 99.7%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
        4. Step-by-step derivation
          1. associate-+r+N/A

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

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

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

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

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

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

            \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
          8. cancel-sign-sub-invN/A

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

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

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

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

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

            \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
          14. associate-+r+N/A

            \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
        5. Simplified99.8%

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

          \[\leadsto y + \color{blue}{z \cdot \left(1 - \log t\right)} \]
        7. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto y + z \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \]
          2. log-recN/A

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

            \[\leadsto y + z \cdot \color{blue}{\left(\log \left(\frac{1}{t}\right) + 1\right)} \]
          4. distribute-rgt-inN/A

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

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

            \[\leadsto y + \left(\color{blue}{\left(\log \left(\frac{1}{t}\right) \cdot 1\right) \cdot z} + 1 \cdot z\right) \]
          7. metadata-evalN/A

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

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

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

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

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

            \[\leadsto y + \left(\color{blue}{\log t \cdot \left(-1 \cdot z\right)} + 1 \cdot z\right) \]
          13. *-lft-identityN/A

            \[\leadsto y + \left(\log t \cdot \left(-1 \cdot z\right) + \color{blue}{z}\right) \]
          14. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(\log t, -1 \cdot z, z\right)} \]
          15. log-lowering-log.f64N/A

            \[\leadsto y + \mathsf{fma}\left(\color{blue}{\log t}, -1 \cdot z, z\right) \]
          16. mul-1-negN/A

            \[\leadsto y + \mathsf{fma}\left(\log t, \color{blue}{\mathsf{neg}\left(z\right)}, z\right) \]
          17. neg-lowering-neg.f6469.4

            \[\leadsto y + \mathsf{fma}\left(\log t, \color{blue}{-z}, z\right) \]
        8. Simplified69.4%

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

        if -4.50000000000000046e158 < z < 1.54999999999999999e180

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6491.3

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified91.3%

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

      Alternative 7: 85.9% accurate, 1.0× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := x + \mathsf{fma}\left(\log t, -z, z\right)\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+182}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ x (fma (log t) (- z) z))))
         (if (<= z -2.5e+194)
           t_1
           (if (<= z 4.4e+182) (+ y (fma b (+ a -0.5) x)) t_1))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x + fma(log(t), -z, z);
      	double tmp;
      	if (z <= -2.5e+194) {
      		tmp = t_1;
      	} else if (z <= 4.4e+182) {
      		tmp = y + fma(b, (a + -0.5), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x + fma(log(t), Float64(-z), z))
      	tmp = 0.0
      	if (z <= -2.5e+194)
      		tmp = t_1;
      	elseif (z <= 4.4e+182)
      		tmp = Float64(y + fma(b, Float64(a + -0.5), x));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[Log[t], $MachinePrecision] * (-z) + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+194], t$95$1, If[LessEqual[z, 4.4e+182], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      t_1 := x + \mathsf{fma}\left(\log t, -z, z\right)\\
      \mathbf{if}\;z \leq -2.5 \cdot 10^{+194}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 4.4 \cdot 10^{+182}:\\
      \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -2.49999999999999994e194 or 4.39999999999999993e182 < z

        1. Initial program 99.7%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in a around 0

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

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

            \[\leadsto \color{blue}{x + \left(\left(y + \left(z + \frac{-1}{2} \cdot b\right)\right) - z \cdot \log t\right)} \]
          3. associate-+r+N/A

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

            \[\leadsto x + \left(\color{blue}{\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right)} - z \cdot \log t\right) \]
          5. remove-double-negN/A

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

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

            \[\leadsto x + \left(\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right) - \color{blue}{\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)}\right) \]
          8. mul-1-negN/A

            \[\leadsto x + \left(\left(\frac{-1}{2} \cdot b + \left(y + z\right)\right) - \color{blue}{-1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)}\right) \]
          9. associate--l+N/A

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

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

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

            \[\leadsto x + \left(b \cdot \frac{-1}{2} + \left(\left(y + z\right) - \color{blue}{z \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right)}\right)\right) \]
          13. log-recN/A

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

            \[\leadsto x + \left(b \cdot \frac{-1}{2} + \left(\left(y + z\right) - z \cdot \color{blue}{\log t}\right)\right) \]
          15. accelerator-lowering-fma.f64N/A

            \[\leadsto x + \color{blue}{\mathsf{fma}\left(b, \frac{-1}{2}, \left(y + z\right) - z \cdot \log t\right)} \]
          16. cancel-sign-sub-invN/A

            \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{\left(y + z\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t}\right) \]
          17. associate-+l+N/A

            \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{y + \left(z + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t\right)}\right) \]
          18. cancel-sign-sub-invN/A

            \[\leadsto x + \mathsf{fma}\left(b, \frac{-1}{2}, y + \color{blue}{\left(z - z \cdot \log t\right)}\right) \]
        5. Simplified80.7%

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

          \[\leadsto x + \color{blue}{z \cdot \left(1 - \log t\right)} \]
        7. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto x + z \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \]
          2. log-recN/A

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

            \[\leadsto x + z \cdot \color{blue}{\left(\log \left(\frac{1}{t}\right) + 1\right)} \]
          4. distribute-rgt-inN/A

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

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

            \[\leadsto x + \left(\color{blue}{\left(\log \left(\frac{1}{t}\right) \cdot 1\right) \cdot z} + 1 \cdot z\right) \]
          7. metadata-evalN/A

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

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

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

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

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

            \[\leadsto x + \left(\color{blue}{\log t \cdot \left(-1 \cdot z\right)} + 1 \cdot z\right) \]
          13. *-lft-identityN/A

            \[\leadsto x + \left(\log t \cdot \left(-1 \cdot z\right) + \color{blue}{z}\right) \]
          14. accelerator-lowering-fma.f64N/A

            \[\leadsto x + \color{blue}{\mathsf{fma}\left(\log t, -1 \cdot z, z\right)} \]
          15. log-lowering-log.f64N/A

            \[\leadsto x + \mathsf{fma}\left(\color{blue}{\log t}, -1 \cdot z, z\right) \]
          16. mul-1-negN/A

            \[\leadsto x + \mathsf{fma}\left(\log t, \color{blue}{\mathsf{neg}\left(z\right)}, z\right) \]
          17. neg-lowering-neg.f6470.1

            \[\leadsto x + \mathsf{fma}\left(\log t, \color{blue}{-z}, z\right) \]
        8. Simplified70.1%

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

        if -2.49999999999999994e194 < z < 4.39999999999999993e182

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6489.6

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified89.6%

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

      Alternative 8: 81.4% accurate, 1.1× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+193}:\\ \;\;\;\;\mathsf{fma}\left(\log t, -z, z\right)\\ \mathbf{else}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -1e+193) (fma (log t) (- z) z) (+ y (fma b (+ a -0.5) x))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -1e+193) {
      		tmp = fma(log(t), -z, z);
      	} else {
      		tmp = y + fma(b, (a + -0.5), x);
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -1e+193)
      		tmp = fma(log(t), Float64(-z), z);
      	else
      		tmp = Float64(y + fma(b, Float64(a + -0.5), x));
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+193], N[(N[Log[t], $MachinePrecision] * (-z) + z), $MachinePrecision], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -1 \cdot 10^{+193}:\\
      \;\;\;\;\mathsf{fma}\left(\log t, -z, z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.00000000000000007e193

        1. Initial program 99.6%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
        4. Step-by-step derivation
          1. associate-+r+N/A

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

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

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

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

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

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

            \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
          8. cancel-sign-sub-invN/A

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

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

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

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

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

            \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
          14. associate-+r+N/A

            \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
        5. Simplified99.7%

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

          \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]
        7. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto z \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \]
          2. log-recN/A

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

            \[\leadsto z \cdot \color{blue}{\left(\log \left(\frac{1}{t}\right) + 1\right)} \]
          4. distribute-rgt-inN/A

            \[\leadsto \color{blue}{\log \left(\frac{1}{t}\right) \cdot z + 1 \cdot z} \]
          5. *-lft-identityN/A

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

            \[\leadsto \color{blue}{\left(\log \left(\frac{1}{t}\right) \cdot 1\right) \cdot z} + 1 \cdot z \]
          7. metadata-evalN/A

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

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

            \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right) \cdot -1\right)} \cdot z + 1 \cdot z \]
          10. log-recN/A

            \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right)\right) \cdot -1\right) \cdot z + 1 \cdot z \]
          11. remove-double-negN/A

            \[\leadsto \left(\color{blue}{\log t} \cdot -1\right) \cdot z + 1 \cdot z \]
          12. associate-*l*N/A

            \[\leadsto \color{blue}{\log t \cdot \left(-1 \cdot z\right)} + 1 \cdot z \]
          13. *-lft-identityN/A

            \[\leadsto \log t \cdot \left(-1 \cdot z\right) + \color{blue}{z} \]
          14. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\log t, -1 \cdot z, z\right)} \]
          15. log-lowering-log.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\log t}, -1 \cdot z, z\right) \]
          16. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\log t, \color{blue}{\mathsf{neg}\left(z\right)}, z\right) \]
          17. neg-lowering-neg.f6471.5

            \[\leadsto \mathsf{fma}\left(\log t, \color{blue}{-z}, z\right) \]
        8. Simplified71.5%

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

        if -1.00000000000000007e193 < z

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6485.8

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified85.8%

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

      Alternative 9: 81.5% accurate, 1.1× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+195}:\\ \;\;\;\;z - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -1.3e+195) (- z (* z (log t))) (+ y (fma b (+ a -0.5) x))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -1.3e+195) {
      		tmp = z - (z * log(t));
      	} else {
      		tmp = y + fma(b, (a + -0.5), x);
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -1.3e+195)
      		tmp = Float64(z - Float64(z * log(t)));
      	else
      		tmp = Float64(y + fma(b, Float64(a + -0.5), x));
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+195], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -1.3 \cdot 10^{+195}:\\
      \;\;\;\;z - z \cdot \log t\\
      
      \mathbf{else}:\\
      \;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.30000000000000001e195

        1. Initial program 99.6%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]
        4. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto z \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \]
          2. log-recN/A

            \[\leadsto z \cdot \left(1 + \color{blue}{\log \left(\frac{1}{t}\right)}\right) \]
          3. distribute-lft-inN/A

            \[\leadsto \color{blue}{z \cdot 1 + z \cdot \log \left(\frac{1}{t}\right)} \]
          4. *-rgt-identityN/A

            \[\leadsto \color{blue}{z} + z \cdot \log \left(\frac{1}{t}\right) \]
          5. remove-double-negN/A

            \[\leadsto z + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)\right)\right)} \]
          6. mul-1-negN/A

            \[\leadsto z + \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)}\right)\right) \]
          7. sub-negN/A

            \[\leadsto \color{blue}{z - -1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)} \]
          8. --lowering--.f64N/A

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

            \[\leadsto z - \color{blue}{\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)} \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto z - \color{blue}{z \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right)} \]
          11. log-recN/A

            \[\leadsto z - z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right)\right) \]
          12. remove-double-negN/A

            \[\leadsto z - z \cdot \color{blue}{\log t} \]
          13. *-lowering-*.f64N/A

            \[\leadsto z - \color{blue}{z \cdot \log t} \]
          14. log-lowering-log.f6471.5

            \[\leadsto z - z \cdot \color{blue}{\log t} \]
        5. Simplified71.5%

          \[\leadsto \color{blue}{z - z \cdot \log t} \]

        if -1.30000000000000001e195 < z

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6485.8

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified85.8%

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

      Alternative 10: 59.1% accurate, 2.6× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* b (- a 0.5))))
         (if (<= t_1 -5e+301)
           (* b a)
           (if (<= t_1 -1e+168)
             (fma b -0.5 x)
             (if (<= t_1 2e+181) (+ y x) (fma b a x))))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = b * (a - 0.5);
      	double tmp;
      	if (t_1 <= -5e+301) {
      		tmp = b * a;
      	} else if (t_1 <= -1e+168) {
      		tmp = fma(b, -0.5, x);
      	} else if (t_1 <= 2e+181) {
      		tmp = y + x;
      	} else {
      		tmp = fma(b, a, x);
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	t_1 = Float64(b * Float64(a - 0.5))
      	tmp = 0.0
      	if (t_1 <= -5e+301)
      		tmp = Float64(b * a);
      	elseif (t_1 <= -1e+168)
      		tmp = fma(b, -0.5, x);
      	elseif (t_1 <= 2e+181)
      		tmp = Float64(y + x);
      	else
      		tmp = fma(b, a, x);
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+301], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e+168], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+181], N[(y + x), $MachinePrecision], N[(b * a + x), $MachinePrecision]]]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      t_1 := b \cdot \left(a - 0.5\right)\\
      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\
      \;\;\;\;b \cdot a\\
      
      \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\
      \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\
      \;\;\;\;y + x\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(b, a, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.0000000000000004e301

        1. Initial program 100.0%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in a around inf

          \[\leadsto \color{blue}{a \cdot b} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{b \cdot a} \]
          2. *-lowering-*.f64100.0

            \[\leadsto \color{blue}{b \cdot a} \]
        5. Simplified100.0%

          \[\leadsto \color{blue}{b \cdot a} \]

        if -5.0000000000000004e301 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.9999999999999993e167

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

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

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

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

            \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          5. sub-negN/A

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          6. metadata-evalN/A

            \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          7. +-lowering-+.f6489.1

            \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        5. Simplified89.1%

          \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
        6. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x + b \cdot \left(a - \frac{1}{2}\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + x} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
          3. sub-negN/A

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
          5. +-lowering-+.f6481.7

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
        8. Simplified81.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
        9. Taylor expanded in a around 0

          \[\leadsto \color{blue}{x + \frac{-1}{2} \cdot b} \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{-1}{2} \cdot b + x} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} + x \]
          3. accelerator-lowering-fma.f6456.3

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]
        11. Simplified56.3%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]

        if -9.9999999999999993e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999998e181

        1. Initial program 99.8%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
        4. Step-by-step derivation
          1. associate-+r+N/A

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

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

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

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

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

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

            \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
          8. cancel-sign-sub-invN/A

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

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

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

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

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

            \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
          14. associate-+r+N/A

            \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
        5. Simplified99.9%

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

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

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

          if 1.9999999999999998e181 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

          1. Initial program 100.0%

            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
          2. Add Preprocessing
          3. Taylor expanded in z around 0

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

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

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

              \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
            5. sub-negN/A

              \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
            6. metadata-evalN/A

              \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
            7. +-lowering-+.f6498.0

              \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
          5. Simplified98.0%

            \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
          6. Taylor expanded in y around 0

            \[\leadsto \color{blue}{x + b \cdot \left(a - \frac{1}{2}\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + x} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
            3. sub-negN/A

              \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
            5. +-lowering-+.f6495.8

              \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
          8. Simplified95.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
          9. Taylor expanded in a around inf

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a}, x\right) \]
          10. Step-by-step derivation
            1. Simplified76.1%

              \[\leadsto \mathsf{fma}\left(b, \color{blue}{a}, x\right) \]
          11. Recombined 4 regimes into one program.
          12. Final simplification65.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+168}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x\right)\\ \end{array} \]
          13. Add Preprocessing

          Alternative 11: 58.3% accurate, 2.6× speedup?

          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* b (- a 0.5))))
             (if (<= t_1 -5e+301)
               (* b a)
               (if (<= t_1 -1e+168)
                 (fma b -0.5 x)
                 (if (<= t_1 2e+181) (+ y x) (* b a))))))
          assert(x < y && y < z && z < t && t < a && a < b);
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = b * (a - 0.5);
          	double tmp;
          	if (t_1 <= -5e+301) {
          		tmp = b * a;
          	} else if (t_1 <= -1e+168) {
          		tmp = fma(b, -0.5, x);
          	} else if (t_1 <= 2e+181) {
          		tmp = y + x;
          	} else {
          		tmp = b * a;
          	}
          	return tmp;
          }
          
          x, y, z, t, a, b = sort([x, y, z, t, a, b])
          function code(x, y, z, t, a, b)
          	t_1 = Float64(b * Float64(a - 0.5))
          	tmp = 0.0
          	if (t_1 <= -5e+301)
          		tmp = Float64(b * a);
          	elseif (t_1 <= -1e+168)
          		tmp = fma(b, -0.5, x);
          	elseif (t_1 <= 2e+181)
          		tmp = Float64(y + x);
          	else
          		tmp = Float64(b * a);
          	end
          	return tmp
          end
          
          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+301], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e+168], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+181], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
          
          \begin{array}{l}
          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
          \\
          \begin{array}{l}
          t_1 := b \cdot \left(a - 0.5\right)\\
          \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\
          \;\;\;\;b \cdot a\\
          
          \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\
          \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
          
          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\
          \;\;\;\;y + x\\
          
          \mathbf{else}:\\
          \;\;\;\;b \cdot a\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.0000000000000004e301 or 1.9999999999999998e181 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

            1. Initial program 100.0%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in a around inf

              \[\leadsto \color{blue}{a \cdot b} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{b \cdot a} \]
              2. *-lowering-*.f6481.5

                \[\leadsto \color{blue}{b \cdot a} \]
            5. Simplified81.5%

              \[\leadsto \color{blue}{b \cdot a} \]

            if -5.0000000000000004e301 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.9999999999999993e167

            1. Initial program 99.9%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in z around 0

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

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

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

                \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
              4. accelerator-lowering-fma.f64N/A

                \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
              5. sub-negN/A

                \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
              6. metadata-evalN/A

                \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
              7. +-lowering-+.f6489.1

                \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
            5. Simplified89.1%

              \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
            6. Taylor expanded in y around 0

              \[\leadsto \color{blue}{x + b \cdot \left(a - \frac{1}{2}\right)} \]
            7. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + x} \]
              2. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
              3. sub-negN/A

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
              5. +-lowering-+.f6481.7

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
            8. Simplified81.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
            9. Taylor expanded in a around 0

              \[\leadsto \color{blue}{x + \frac{-1}{2} \cdot b} \]
            10. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{-1}{2} \cdot b + x} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} + x \]
              3. accelerator-lowering-fma.f6456.3

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]
            11. Simplified56.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]

            if -9.9999999999999993e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999998e181

            1. Initial program 99.8%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

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

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

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

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

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

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

                \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
              8. cancel-sign-sub-invN/A

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

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

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

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

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

                \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
              14. associate-+r+N/A

                \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
            5. Simplified99.9%

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

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

                \[\leadsto y + \color{blue}{x} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification64.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+168}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \]
            10. Add Preprocessing

            Alternative 12: 57.3% accurate, 2.6× speedup?

            \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
            NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* b (- a 0.5))))
               (if (<= t_1 -5e+301)
                 (* b a)
                 (if (<= t_1 -1e+168) (* b -0.5) (if (<= t_1 2e+181) (+ y x) (* b a))))))
            assert(x < y && y < z && z < t && t < a && a < b);
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = b * (a - 0.5);
            	double tmp;
            	if (t_1 <= -5e+301) {
            		tmp = b * a;
            	} else if (t_1 <= -1e+168) {
            		tmp = b * -0.5;
            	} else if (t_1 <= 2e+181) {
            		tmp = y + x;
            	} else {
            		tmp = b * a;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t, a, b)
                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), intent (in) :: b
                real(8) :: t_1
                real(8) :: tmp
                t_1 = b * (a - 0.5d0)
                if (t_1 <= (-5d+301)) then
                    tmp = b * a
                else if (t_1 <= (-1d+168)) then
                    tmp = b * (-0.5d0)
                else if (t_1 <= 2d+181) then
                    tmp = y + x
                else
                    tmp = b * a
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t && t < a && a < b;
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = b * (a - 0.5);
            	double tmp;
            	if (t_1 <= -5e+301) {
            		tmp = b * a;
            	} else if (t_1 <= -1e+168) {
            		tmp = b * -0.5;
            	} else if (t_1 <= 2e+181) {
            		tmp = y + x;
            	} else {
            		tmp = b * a;
            	}
            	return tmp;
            }
            
            [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
            def code(x, y, z, t, a, b):
            	t_1 = b * (a - 0.5)
            	tmp = 0
            	if t_1 <= -5e+301:
            		tmp = b * a
            	elif t_1 <= -1e+168:
            		tmp = b * -0.5
            	elif t_1 <= 2e+181:
            		tmp = y + x
            	else:
            		tmp = b * a
            	return tmp
            
            x, y, z, t, a, b = sort([x, y, z, t, a, b])
            function code(x, y, z, t, a, b)
            	t_1 = Float64(b * Float64(a - 0.5))
            	tmp = 0.0
            	if (t_1 <= -5e+301)
            		tmp = Float64(b * a);
            	elseif (t_1 <= -1e+168)
            		tmp = Float64(b * -0.5);
            	elseif (t_1 <= 2e+181)
            		tmp = Float64(y + x);
            	else
            		tmp = Float64(b * a);
            	end
            	return tmp
            end
            
            x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = b * (a - 0.5);
            	tmp = 0.0;
            	if (t_1 <= -5e+301)
            		tmp = b * a;
            	elseif (t_1 <= -1e+168)
            		tmp = b * -0.5;
            	elseif (t_1 <= 2e+181)
            		tmp = y + x;
            	else
            		tmp = b * a;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+301], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -1e+168], N[(b * -0.5), $MachinePrecision], If[LessEqual[t$95$1, 2e+181], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
            
            \begin{array}{l}
            [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
            \\
            \begin{array}{l}
            t_1 := b \cdot \left(a - 0.5\right)\\
            \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301}:\\
            \;\;\;\;b \cdot a\\
            
            \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+168}:\\
            \;\;\;\;b \cdot -0.5\\
            
            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\
            \;\;\;\;y + x\\
            
            \mathbf{else}:\\
            \;\;\;\;b \cdot a\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.0000000000000004e301 or 1.9999999999999998e181 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

              1. Initial program 100.0%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in a around inf

                \[\leadsto \color{blue}{a \cdot b} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{b \cdot a} \]
                2. *-lowering-*.f6481.5

                  \[\leadsto \color{blue}{b \cdot a} \]
              5. Simplified81.5%

                \[\leadsto \color{blue}{b \cdot a} \]

              if -5.0000000000000004e301 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.9999999999999993e167

              1. Initial program 99.9%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in b around inf

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
              4. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                2. sub-negN/A

                  \[\leadsto b \cdot \color{blue}{\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)} \]
                3. metadata-evalN/A

                  \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                4. +-lowering-+.f6473.4

                  \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
              5. Simplified73.4%

                \[\leadsto \color{blue}{b \cdot \left(a + -0.5\right)} \]
              6. Taylor expanded in a around 0

                \[\leadsto \color{blue}{\frac{-1}{2} \cdot b} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} \]
                2. *-lowering-*.f6447.7

                  \[\leadsto \color{blue}{b \cdot -0.5} \]
              8. Simplified47.7%

                \[\leadsto \color{blue}{b \cdot -0.5} \]

              if -9.9999999999999993e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999998e181

              1. Initial program 99.8%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
              4. Step-by-step derivation
                1. associate-+r+N/A

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

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

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

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

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

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

                  \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
                8. cancel-sign-sub-invN/A

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

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

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

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

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

                  \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
                14. associate-+r+N/A

                  \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
              5. Simplified99.9%

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

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

                  \[\leadsto y + \color{blue}{x} \]
              8. Recombined 3 regimes into one program.
              9. Final simplification63.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+301}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+168}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \]
              10. Add Preprocessing

              Alternative 13: 69.6% accurate, 3.3× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ t_2 := b \cdot \left(a + -0.5\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + \mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* b (- a 0.5))) (t_2 (* b (+ a -0.5))))
                 (if (<= t_1 -4e+158) t_2 (if (<= t_1 2e+181) (+ y (fma b -0.5 x)) t_2))))
              assert(x < y && y < z && z < t && t < a && a < b);
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = b * (a - 0.5);
              	double t_2 = b * (a + -0.5);
              	double tmp;
              	if (t_1 <= -4e+158) {
              		tmp = t_2;
              	} else if (t_1 <= 2e+181) {
              		tmp = y + fma(b, -0.5, x);
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              x, y, z, t, a, b = sort([x, y, z, t, a, b])
              function code(x, y, z, t, a, b)
              	t_1 = Float64(b * Float64(a - 0.5))
              	t_2 = Float64(b * Float64(a + -0.5))
              	tmp = 0.0
              	if (t_1 <= -4e+158)
              		tmp = t_2;
              	elseif (t_1 <= 2e+181)
              		tmp = Float64(y + fma(b, -0.5, x));
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+158], t$95$2, If[LessEqual[t$95$1, 2e+181], N[(y + N[(b * -0.5 + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
              
              \begin{array}{l}
              [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
              \\
              \begin{array}{l}
              t_1 := b \cdot \left(a - 0.5\right)\\
              t_2 := b \cdot \left(a + -0.5\right)\\
              \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+158}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+181}:\\
              \;\;\;\;y + \mathsf{fma}\left(b, -0.5, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -3.99999999999999981e158 or 1.9999999999999998e181 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                1. Initial program 100.0%

                  \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                2. Add Preprocessing
                3. Taylor expanded in b around inf

                  \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                4. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                  2. sub-negN/A

                    \[\leadsto b \cdot \color{blue}{\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)} \]
                  3. metadata-evalN/A

                    \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                  4. +-lowering-+.f6487.8

                    \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                5. Simplified87.8%

                  \[\leadsto \color{blue}{b \cdot \left(a + -0.5\right)} \]

                if -3.99999999999999981e158 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999998e181

                1. Initial program 99.8%

                  \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                2. Add Preprocessing
                3. Taylor expanded in z around 0

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

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

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

                    \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
                  4. accelerator-lowering-fma.f64N/A

                    \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
                  5. sub-negN/A

                    \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
                  6. metadata-evalN/A

                    \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                  7. +-lowering-+.f6472.1

                    \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
                5. Simplified72.1%

                  \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
                6. Taylor expanded in a around 0

                  \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{\frac{-1}{2}}, x\right) \]
                7. Step-by-step derivation
                  1. Simplified65.6%

                    \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{-0.5}, x\right) \]
                8. Recombined 2 regimes into one program.
                9. Final simplification74.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4 \cdot 10^{+158}:\\ \;\;\;\;b \cdot \left(a + -0.5\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+181}:\\ \;\;\;\;y + \mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a + -0.5\right)\\ \end{array} \]
                10. Add Preprocessing

                Alternative 14: 65.3% accurate, 3.4× speedup?

                \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ t_2 := b \cdot \left(a + -0.5\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+159}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* b (- a 0.5))) (t_2 (* b (+ a -0.5))))
                   (if (<= t_1 -4e+158) t_2 (if (<= t_1 2e+159) (+ y x) t_2))))
                assert(x < y && y < z && z < t && t < a && a < b);
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = b * (a - 0.5);
                	double t_2 = b * (a + -0.5);
                	double tmp;
                	if (t_1 <= -4e+158) {
                		tmp = t_2;
                	} else if (t_1 <= 2e+159) {
                		tmp = y + x;
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                real(8) function code(x, y, z, t, a, b)
                    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), intent (in) :: b
                    real(8) :: t_1
                    real(8) :: t_2
                    real(8) :: tmp
                    t_1 = b * (a - 0.5d0)
                    t_2 = b * (a + (-0.5d0))
                    if (t_1 <= (-4d+158)) then
                        tmp = t_2
                    else if (t_1 <= 2d+159) then
                        tmp = y + x
                    else
                        tmp = t_2
                    end if
                    code = tmp
                end function
                
                assert x < y && y < z && z < t && t < a && a < b;
                public static double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = b * (a - 0.5);
                	double t_2 = b * (a + -0.5);
                	double tmp;
                	if (t_1 <= -4e+158) {
                		tmp = t_2;
                	} else if (t_1 <= 2e+159) {
                		tmp = y + x;
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                def code(x, y, z, t, a, b):
                	t_1 = b * (a - 0.5)
                	t_2 = b * (a + -0.5)
                	tmp = 0
                	if t_1 <= -4e+158:
                		tmp = t_2
                	elif t_1 <= 2e+159:
                		tmp = y + x
                	else:
                		tmp = t_2
                	return tmp
                
                x, y, z, t, a, b = sort([x, y, z, t, a, b])
                function code(x, y, z, t, a, b)
                	t_1 = Float64(b * Float64(a - 0.5))
                	t_2 = Float64(b * Float64(a + -0.5))
                	tmp = 0.0
                	if (t_1 <= -4e+158)
                		tmp = t_2;
                	elseif (t_1 <= 2e+159)
                		tmp = Float64(y + x);
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                function tmp_2 = code(x, y, z, t, a, b)
                	t_1 = b * (a - 0.5);
                	t_2 = b * (a + -0.5);
                	tmp = 0.0;
                	if (t_1 <= -4e+158)
                		tmp = t_2;
                	elseif (t_1 <= 2e+159)
                		tmp = y + x;
                	else
                		tmp = t_2;
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+158], t$95$2, If[LessEqual[t$95$1, 2e+159], N[(y + x), $MachinePrecision], t$95$2]]]]
                
                \begin{array}{l}
                [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                \\
                \begin{array}{l}
                t_1 := b \cdot \left(a - 0.5\right)\\
                t_2 := b \cdot \left(a + -0.5\right)\\
                \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+158}:\\
                \;\;\;\;t\_2\\
                
                \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+159}:\\
                \;\;\;\;y + x\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -3.99999999999999981e158 or 1.9999999999999999e159 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                  1. Initial program 100.0%

                    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                  2. Add Preprocessing
                  3. Taylor expanded in b around inf

                    \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                  4. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                    2. sub-negN/A

                      \[\leadsto b \cdot \color{blue}{\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)} \]
                    3. metadata-evalN/A

                      \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                    4. +-lowering-+.f6485.8

                      \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                  5. Simplified85.8%

                    \[\leadsto \color{blue}{b \cdot \left(a + -0.5\right)} \]

                  if -3.99999999999999981e158 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999999e159

                  1. Initial program 99.8%

                    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

                    \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
                  4. Step-by-step derivation
                    1. associate-+r+N/A

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

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

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

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

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

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

                      \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
                    8. cancel-sign-sub-invN/A

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

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

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

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

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

                      \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
                    14. associate-+r+N/A

                      \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
                  5. Simplified99.9%

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

                    \[\leadsto y + \color{blue}{x} \]
                  7. Step-by-step derivation
                    1. Simplified60.9%

                      \[\leadsto y + \color{blue}{x} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification71.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4 \cdot 10^{+158}:\\ \;\;\;\;b \cdot \left(a + -0.5\right)\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+159}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a + -0.5\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 15: 72.7% accurate, 6.6× speedup?

                  \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;y + x \leq 10^{-61}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot a\\ \end{array} \end{array} \]
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= (+ y x) 1e-61) (fma b (+ a -0.5) x) (+ y (* b a))))
                  assert(x < y && y < z && z < t && t < a && a < b);
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((y + x) <= 1e-61) {
                  		tmp = fma(b, (a + -0.5), x);
                  	} else {
                  		tmp = y + (b * a);
                  	}
                  	return tmp;
                  }
                  
                  x, y, z, t, a, b = sort([x, y, z, t, a, b])
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (Float64(y + x) <= 1e-61)
                  		tmp = fma(b, Float64(a + -0.5), x);
                  	else
                  		tmp = Float64(y + Float64(b * a));
                  	end
                  	return tmp
                  end
                  
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], 1e-61], N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(b * a), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y + x \leq 10^{-61}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;y + b \cdot a\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (+.f64 x y) < 1e-61

                    1. Initial program 99.8%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around 0

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

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

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

                        \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
                      4. accelerator-lowering-fma.f64N/A

                        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
                      5. sub-negN/A

                        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
                      6. metadata-evalN/A

                        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                      7. +-lowering-+.f6477.3

                        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
                    5. Simplified77.3%

                      \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
                    6. Taylor expanded in y around 0

                      \[\leadsto \color{blue}{x + b \cdot \left(a - \frac{1}{2}\right)} \]
                    7. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + x} \]
                      2. accelerator-lowering-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
                      3. sub-negN/A

                        \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
                      4. metadata-evalN/A

                        \[\leadsto \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                      5. +-lowering-+.f6457.4

                        \[\leadsto \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
                    8. Simplified57.4%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]

                    if 1e-61 < (+.f64 x y)

                    1. Initial program 100.0%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

                      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
                    4. Step-by-step derivation
                      1. associate-+r+N/A

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

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

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

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

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

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

                        \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
                      8. cancel-sign-sub-invN/A

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

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

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

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

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

                        \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
                      14. associate-+r+N/A

                        \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
                    5. Simplified100.0%

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

                      \[\leadsto y + \color{blue}{a \cdot b} \]
                    7. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto y + \color{blue}{b \cdot a} \]
                      2. *-lowering-*.f6448.9

                        \[\leadsto y + \color{blue}{b \cdot a} \]
                    8. Simplified48.9%

                      \[\leadsto y + \color{blue}{b \cdot a} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification53.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y + x \leq 10^{-61}:\\ \;\;\;\;\mathsf{fma}\left(b, a + -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot a\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 16: 46.9% accurate, 7.0× speedup?

                  \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+197}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+172}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot -0.5\\ \end{array} \end{array} \]
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= b -1.05e+197) (* b -0.5) (if (<= b 1.05e+172) (+ y x) (* b -0.5))))
                  assert(x < y && y < z && z < t && t < a && a < b);
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (b <= -1.05e+197) {
                  		tmp = b * -0.5;
                  	} else if (b <= 1.05e+172) {
                  		tmp = y + x;
                  	} else {
                  		tmp = b * -0.5;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  real(8) function code(x, y, z, t, a, b)
                      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), intent (in) :: b
                      real(8) :: tmp
                      if (b <= (-1.05d+197)) then
                          tmp = b * (-0.5d0)
                      else if (b <= 1.05d+172) then
                          tmp = y + x
                      else
                          tmp = b * (-0.5d0)
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t && t < a && a < b;
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (b <= -1.05e+197) {
                  		tmp = b * -0.5;
                  	} else if (b <= 1.05e+172) {
                  		tmp = y + x;
                  	} else {
                  		tmp = b * -0.5;
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if b <= -1.05e+197:
                  		tmp = b * -0.5
                  	elif b <= 1.05e+172:
                  		tmp = y + x
                  	else:
                  		tmp = b * -0.5
                  	return tmp
                  
                  x, y, z, t, a, b = sort([x, y, z, t, a, b])
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (b <= -1.05e+197)
                  		tmp = Float64(b * -0.5);
                  	elseif (b <= 1.05e+172)
                  		tmp = Float64(y + x);
                  	else
                  		tmp = Float64(b * -0.5);
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if (b <= -1.05e+197)
                  		tmp = b * -0.5;
                  	elseif (b <= 1.05e+172)
                  		tmp = y + x;
                  	else
                  		tmp = b * -0.5;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+197], N[(b * -0.5), $MachinePrecision], If[LessEqual[b, 1.05e+172], N[(y + x), $MachinePrecision], N[(b * -0.5), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b \leq -1.05 \cdot 10^{+197}:\\
                  \;\;\;\;b \cdot -0.5\\
                  
                  \mathbf{elif}\;b \leq 1.05 \cdot 10^{+172}:\\
                  \;\;\;\;y + x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;b \cdot -0.5\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if b < -1.05000000000000003e197 or 1.0500000000000001e172 < b

                    1. Initial program 100.0%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in b around inf

                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                      2. sub-negN/A

                        \[\leadsto b \cdot \color{blue}{\left(a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)} \]
                      3. metadata-evalN/A

                        \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                      4. +-lowering-+.f6490.3

                        \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                    5. Simplified90.3%

                      \[\leadsto \color{blue}{b \cdot \left(a + -0.5\right)} \]
                    6. Taylor expanded in a around 0

                      \[\leadsto \color{blue}{\frac{-1}{2} \cdot b} \]
                    7. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} \]
                      2. *-lowering-*.f6441.4

                        \[\leadsto \color{blue}{b \cdot -0.5} \]
                    8. Simplified41.4%

                      \[\leadsto \color{blue}{b \cdot -0.5} \]

                    if -1.05000000000000003e197 < b < 1.0500000000000001e172

                    1. Initial program 99.9%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

                      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
                    4. Step-by-step derivation
                      1. associate-+r+N/A

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

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

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

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

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

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

                        \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
                      8. cancel-sign-sub-invN/A

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

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

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

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

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

                        \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
                      14. associate-+r+N/A

                        \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
                    5. Simplified99.9%

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

                      \[\leadsto y + \color{blue}{x} \]
                    7. Step-by-step derivation
                      1. Simplified50.2%

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

                    Alternative 17: 78.4% accurate, 9.7× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ y + \mathsf{fma}\left(b, a + -0.5, x\right) \end{array} \]
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b) :precision binary64 (+ y (fma b (+ a -0.5) x)))
                    assert(x < y && y < z && z < t && t < a && a < b);
                    double code(double x, double y, double z, double t, double a, double b) {
                    	return y + fma(b, (a + -0.5), x);
                    }
                    
                    x, y, z, t, a, b = sort([x, y, z, t, a, b])
                    function code(x, y, z, t, a, b)
                    	return Float64(y + fma(b, Float64(a + -0.5), x))
                    end
                    
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_] := N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                    \\
                    y + \mathsf{fma}\left(b, a + -0.5, x\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.9%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around 0

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

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

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

                        \[\leadsto \color{blue}{y + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
                      4. accelerator-lowering-fma.f64N/A

                        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, x\right)} \]
                      5. sub-negN/A

                        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, x\right) \]
                      6. metadata-evalN/A

                        \[\leadsto y + \mathsf{fma}\left(b, a + \color{blue}{\frac{-1}{2}}, x\right) \]
                      7. +-lowering-+.f6481.2

                        \[\leadsto y + \mathsf{fma}\left(b, \color{blue}{a + -0.5}, x\right) \]
                    5. Simplified81.2%

                      \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
                    6. Add Preprocessing

                    Alternative 18: 41.6% accurate, 31.5× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ y + x \end{array} \]
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b) :precision binary64 (+ y x))
                    assert(x < y && y < z && z < t && t < a && a < b);
                    double code(double x, double y, double z, double t, double a, double b) {
                    	return y + x;
                    }
                    
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    real(8) function code(x, y, z, t, a, b)
                        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), intent (in) :: b
                        code = y + x
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b;
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	return y + x;
                    }
                    
                    [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                    def code(x, y, z, t, a, b):
                    	return y + x
                    
                    x, y, z, t, a, b = sort([x, y, z, t, a, b])
                    function code(x, y, z, t, a, b)
                    	return Float64(y + x)
                    end
                    
                    x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                    function tmp = code(x, y, z, t, a, b)
                    	tmp = y + x;
                    end
                    
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_] := N[(y + x), $MachinePrecision]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                    \\
                    y + x
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.9%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

                      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)\right) - z \cdot \log t} \]
                    4. Step-by-step derivation
                      1. associate-+r+N/A

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

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

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

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

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

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

                        \[\leadsto y + \left(\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z}\right) \]
                      8. cancel-sign-sub-invN/A

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

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

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

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

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

                        \[\leadsto y + \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)}\right) \]
                      14. associate-+r+N/A

                        \[\leadsto y + \color{blue}{\left(\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
                    5. Simplified99.9%

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

                      \[\leadsto y + \color{blue}{x} \]
                    7. Step-by-step derivation
                      1. Simplified39.5%

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

                      Alternative 19: 21.0% accurate, 126.0× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x \end{array} \]
                      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b) :precision binary64 x)
                      assert(x < y && y < z && z < t && t < a && a < b);
                      double code(double x, double y, double z, double t, double a, double b) {
                      	return x;
                      }
                      
                      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                      real(8) function code(x, y, z, t, a, b)
                          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), intent (in) :: b
                          code = x
                      end function
                      
                      assert x < y && y < z && z < t && t < a && a < b;
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	return x;
                      }
                      
                      [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                      def code(x, y, z, t, a, b):
                      	return x
                      
                      x, y, z, t, a, b = sort([x, y, z, t, a, b])
                      function code(x, y, z, t, a, b)
                      	return x
                      end
                      
                      x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                      function tmp = code(x, y, z, t, a, b)
                      	tmp = x;
                      end
                      
                      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_] := x
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                      \\
                      x
                      \end{array}
                      
                      Derivation
                      1. Initial program 99.9%

                        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around inf

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

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

                        Developer Target 1: 99.5% accurate, 0.4× speedup?

                        \[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (+
                          (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
                          (* (- a 0.5) b)))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                        }
                        
                        real(8) function code(x, y, z, t, a, b)
                            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), intent (in) :: b
                            code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
                        }
                        
                        def code(x, y, z, t, a, b):
                        	return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
                        
                        function code(x, y, z, t, a, b)
                        	return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b))
                        end
                        
                        function tmp = code(x, y, z, t, a, b)
                        	tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
                        \end{array}
                        

                        Reproduce

                        ?
                        herbie shell --seed 2024199 
                        (FPCore (x y z t a b)
                          :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
                          :precision binary64
                        
                          :alt
                          (! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
                        
                          (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))