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

Percentage Accurate: 99.9% → 99.9%
Time: 23.4s
Alternatives: 17
Speedup: 1.0×

Specification

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

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\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 17 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.4× speedup?

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Step-by-step derivation
    1. +-commutative99.8%

      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    2. fma-def99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    3. +-commutative99.8%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    4. fma-def99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    5. sub-neg99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{b + \left(-0.5\right)}, \log c, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right) \]
    6. metadata-eval99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + \color{blue}{-0.5}, \log c, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right) \]
    7. +-commutative99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
    8. associate-+l+99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, a + \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)}\right)\right) \]
    9. associate-+r+99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{\left(a + x \cdot \log y\right) + \left(z + t\right)}\right)\right) \]
    10. +-commutative99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{\left(x \cdot \log y + a\right)} + \left(z + t\right)\right)\right) \]
    11. fma-def99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{\mathsf{fma}\left(x, \log y, a\right)} + \left(z + t\right)\right)\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right)\right)} \]
  4. Final simplification99.9%

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right)\right) \]

Alternative 2: 99.9% accurate, 1.0× speedup?

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Final simplification99.8%

    \[\leadsto \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i \]

Alternative 3: 89.7% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t_1\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6e193 or 4.00000000000000007e234 < x

    1. Initial program 99.6%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Step-by-step derivation
      1. add-cube-cbrt98.7%

        \[\leadsto \left(\left(\left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \log y} \cdot \sqrt[3]{x \cdot \log y}\right) \cdot \sqrt[3]{x \cdot \log y}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. pow398.5%

        \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Applied egg-rr98.5%

      \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Taylor expanded in a around 0 89.4%

      \[\leadsto \color{blue}{\left(t + \left(z + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. associate-+r+89.4%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)} + y \cdot i \]
      2. sub-neg89.4%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      3. metadata-eval89.4%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      4. fma-def89.4%

        \[\leadsto \left(\left(t + z\right) + \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)}\right) + y \cdot i \]
      5. pow-base-189.4%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{1} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      6. *-lft-identity89.4%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{x \cdot \log y}\right)\right) + y \cdot i \]
    6. Simplified89.4%

      \[\leadsto \color{blue}{\left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, x \cdot \log y\right)\right)} + y \cdot i \]
    7. Taylor expanded in y around 0 83.4%

      \[\leadsto \color{blue}{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)} \]

    if -6e193 < x < 4.00000000000000007e234

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 95.5%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+193} \lor \neg \left(x \leq 4 \cdot 10^{+234}\right):\\ \;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \end{array} \]

Alternative 4: 89.7% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+195} \lor \neg \left(x \leq 6 \cdot 10^{+234}\right):\\ \;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \mathsf{fma}\left(\log c, b + -0.5, a + \left(z + t\right)\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -1.95e+195) (not (<= x 6e+234)))
   (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))
   (+ (* y i) (fma (log c) (+ b -0.5) (+ a (+ z t))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -1.95e+195) || !(x <= 6e+234)) {
		tmp = t + (z + ((x * log(y)) + (log(c) * (b - 0.5))));
	} else {
		tmp = (y * i) + fma(log(c), (b + -0.5), (a + (z + t)));
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -1.95e+195) || !(x <= 6e+234))
		tmp = Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))));
	else
		tmp = Float64(Float64(y * i) + fma(log(c), Float64(b + -0.5), Float64(a + Float64(z + t))));
	end
	return tmp
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.95e+195], N[Not[LessEqual[x, 6e+234]], $MachinePrecision]], N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+195} \lor \neg \left(x \leq 6 \cdot 10^{+234}\right):\\
\;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(\log c, b + -0.5, a + \left(z + t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.9499999999999999e195 or 5.9999999999999998e234 < x

    1. Initial program 99.6%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Step-by-step derivation
      1. add-cube-cbrt98.7%

        \[\leadsto \left(\left(\left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \log y} \cdot \sqrt[3]{x \cdot \log y}\right) \cdot \sqrt[3]{x \cdot \log y}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. pow398.5%

        \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Applied egg-rr98.5%

      \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Taylor expanded in a around 0 89.4%

      \[\leadsto \color{blue}{\left(t + \left(z + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. associate-+r+89.4%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)} + y \cdot i \]
      2. sub-neg89.4%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      3. metadata-eval89.4%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      4. fma-def89.4%

        \[\leadsto \left(\left(t + z\right) + \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)}\right) + y \cdot i \]
      5. pow-base-189.4%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{1} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      6. *-lft-identity89.4%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{x \cdot \log y}\right)\right) + y \cdot i \]
    6. Simplified89.4%

      \[\leadsto \color{blue}{\left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, x \cdot \log y\right)\right)} + y \cdot i \]
    7. Taylor expanded in y around 0 83.4%

      \[\leadsto \color{blue}{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)} \]

    if -1.9499999999999999e195 < x < 5.9999999999999998e234

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 95.5%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+95.5%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative95.5%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative95.5%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg95.5%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval95.5%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+95.5%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative95.5%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative95.5%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+95.5%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative95.5%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative95.5%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def95.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative95.5%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+95.5%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative95.5%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative95.5%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative95.5%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified95.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+195} \lor \neg \left(x \leq 6 \cdot 10^{+234}\right):\\ \;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \mathsf{fma}\left(\log c, b + -0.5, a + \left(z + t\right)\right)\\ \end{array} \]

Alternative 5: 98.1% accurate, 1.0× speedup?

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Taylor expanded in b around inf 97.0%

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
  3. Step-by-step derivation
    1. *-commutative97.0%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
  4. Simplified97.0%

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
  5. Final simplification97.0%

    \[\leadsto y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right) \]

Alternative 6: 66.3% accurate, 1.8× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := x \cdot \log y + y \cdot i\\ t_2 := a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{if}\;y \leq 6.55 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+189}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+242}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x (log y)) (* y i)))
        (t_2 (+ a (+ z (* (log c) (- b 0.5))))))
   (if (<= y 6.55e+47)
     t_2
     (if (<= y 7.2e+76)
       t_1
       (if (<= y 3e+93)
         t_2
         (if (<= y 3.8e+128)
           t_1
           (if (<= y 5.2e+139)
             t_2
             (if (<= y 8.2e+189)
               (+ (* y i) (* b (log c)))
               (if (<= y 3.6e+242) (+ z (* y i)) t_1)))))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * log(y)) + (y * i);
	double t_2 = a + (z + (log(c) * (b - 0.5)));
	double tmp;
	if (y <= 6.55e+47) {
		tmp = t_2;
	} else if (y <= 7.2e+76) {
		tmp = t_1;
	} else if (y <= 3e+93) {
		tmp = t_2;
	} else if (y <= 3.8e+128) {
		tmp = t_1;
	} else if (y <= 5.2e+139) {
		tmp = t_2;
	} else if (y <= 8.2e+189) {
		tmp = (y * i) + (b * log(c));
	} else if (y <= 3.6e+242) {
		tmp = z + (y * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x * log(y)) + (y * i)
    t_2 = a + (z + (log(c) * (b - 0.5d0)))
    if (y <= 6.55d+47) then
        tmp = t_2
    else if (y <= 7.2d+76) then
        tmp = t_1
    else if (y <= 3d+93) then
        tmp = t_2
    else if (y <= 3.8d+128) then
        tmp = t_1
    else if (y <= 5.2d+139) then
        tmp = t_2
    else if (y <= 8.2d+189) then
        tmp = (y * i) + (b * log(c))
    else if (y <= 3.6d+242) then
        tmp = z + (y * i)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * Math.log(y)) + (y * i);
	double t_2 = a + (z + (Math.log(c) * (b - 0.5)));
	double tmp;
	if (y <= 6.55e+47) {
		tmp = t_2;
	} else if (y <= 7.2e+76) {
		tmp = t_1;
	} else if (y <= 3e+93) {
		tmp = t_2;
	} else if (y <= 3.8e+128) {
		tmp = t_1;
	} else if (y <= 5.2e+139) {
		tmp = t_2;
	} else if (y <= 8.2e+189) {
		tmp = (y * i) + (b * Math.log(c));
	} else if (y <= 3.6e+242) {
		tmp = z + (y * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * math.log(y)) + (y * i)
	t_2 = a + (z + (math.log(c) * (b - 0.5)))
	tmp = 0
	if y <= 6.55e+47:
		tmp = t_2
	elif y <= 7.2e+76:
		tmp = t_1
	elif y <= 3e+93:
		tmp = t_2
	elif y <= 3.8e+128:
		tmp = t_1
	elif y <= 5.2e+139:
		tmp = t_2
	elif y <= 8.2e+189:
		tmp = (y * i) + (b * math.log(c))
	elif y <= 3.6e+242:
		tmp = z + (y * i)
	else:
		tmp = t_1
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * log(y)) + Float64(y * i))
	t_2 = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))))
	tmp = 0.0
	if (y <= 6.55e+47)
		tmp = t_2;
	elseif (y <= 7.2e+76)
		tmp = t_1;
	elseif (y <= 3e+93)
		tmp = t_2;
	elseif (y <= 3.8e+128)
		tmp = t_1;
	elseif (y <= 5.2e+139)
		tmp = t_2;
	elseif (y <= 8.2e+189)
		tmp = Float64(Float64(y * i) + Float64(b * log(c)));
	elseif (y <= 3.6e+242)
		tmp = Float64(z + Float64(y * i));
	else
		tmp = t_1;
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (x * log(y)) + (y * i);
	t_2 = a + (z + (log(c) * (b - 0.5)));
	tmp = 0.0;
	if (y <= 6.55e+47)
		tmp = t_2;
	elseif (y <= 7.2e+76)
		tmp = t_1;
	elseif (y <= 3e+93)
		tmp = t_2;
	elseif (y <= 3.8e+128)
		tmp = t_1;
	elseif (y <= 5.2e+139)
		tmp = t_2;
	elseif (y <= 8.2e+189)
		tmp = (y * i) + (b * log(c));
	elseif (y <= 3.6e+242)
		tmp = z + (y * i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 6.55e+47], t$95$2, If[LessEqual[y, 7.2e+76], t$95$1, If[LessEqual[y, 3e+93], t$95$2, If[LessEqual[y, 3.8e+128], t$95$1, If[LessEqual[y, 5.2e+139], t$95$2, If[LessEqual[y, 8.2e+189], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+242], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y + y \cdot i\\
t_2 := a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{if}\;y \leq 6.55 \cdot 10^{+47}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+93}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+128}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+139}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+189}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+242}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 6.55000000000000025e47 or 7.2000000000000006e76 < y < 2.99999999999999978e93 or 3.7999999999999999e128 < y < 5.20000000000000044e139

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 86.3%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+86.3%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative86.3%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative86.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg86.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval86.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+86.3%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative86.3%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative86.3%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+86.3%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative86.3%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative86.3%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def86.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative86.3%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+86.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative86.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative86.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative86.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified86.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in t around 0 69.2%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in y around 0 65.8%

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

    if 6.55000000000000025e47 < y < 7.2000000000000006e76 or 2.99999999999999978e93 < y < 3.7999999999999999e128 or 3.59999999999999995e242 < y

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around inf 82.6%

      \[\leadsto \color{blue}{x \cdot \log y} + y \cdot i \]

    if 5.20000000000000044e139 < y < 8.2000000000000004e189

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \log y} \cdot \sqrt[3]{x \cdot \log y}\right) \cdot \sqrt[3]{x \cdot \log y}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Taylor expanded in b around inf 77.7%

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    5. Step-by-step derivation
      1. *-commutative77.7%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    6. Simplified77.7%

      \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]

    if 8.2000000000000004e189 < y < 3.59999999999999995e242

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 57.6%

      \[\leadsto \color{blue}{z} + y \cdot i \]
  3. Recombined 4 regimes into one program.
  4. Final simplification69.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.55 \cdot 10^{+47}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+93}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+139}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+189}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+242}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \end{array} \]

Alternative 7: 89.9% accurate, 1.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.04999999999999997e192 or 4.1e207 < x

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{x \cdot \log y} + y \cdot i \]

    if -1.04999999999999997e192 < x < 4.1e207

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 97.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+192} \lor \neg \left(x \leq 4.1 \cdot 10^{+207}\right):\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \end{array} \]

Alternative 8: 89.4% accurate, 1.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.4999999999999997e193 or 1.5000000000000001e206 < x

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{x \cdot \log y} + y \cdot i \]

    if -9.4999999999999997e193 < x < 1.5000000000000001e206

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 97.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+97.1%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative97.1%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative97.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg97.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval97.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+97.1%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative97.1%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative97.1%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+97.1%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative97.1%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative97.1%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def97.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+97.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified97.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in t around 0 82.5%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+193} \lor \neg \left(x \leq 1.5 \cdot 10^{+206}\right):\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \]

Alternative 9: 71.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;y \leq 5 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(z + t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 6.55000000000000025e47

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 84.8%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+84.8%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative84.8%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative84.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg84.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval84.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+84.8%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative84.8%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative84.8%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+84.8%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative84.8%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative84.8%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def84.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative84.8%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+84.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative84.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative84.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative84.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified84.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in t around 0 68.1%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in y around 0 65.8%

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

    if 6.55000000000000025e47 < y < 4.9999999999999997e59

    1. Initial program 99.3%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around inf 85.9%

      \[\leadsto \color{blue}{x \cdot \log y} + y \cdot i \]

    if 4.9999999999999997e59 < y

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \log y} \cdot \sqrt[3]{x \cdot \log y}\right) \cdot \sqrt[3]{x \cdot \log y}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Taylor expanded in a around 0 90.8%

      \[\leadsto \color{blue}{\left(t + \left(z + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. associate-+r+90.8%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\log c \cdot \left(b - 0.5\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right)} + y \cdot i \]
      2. sub-neg90.8%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      3. metadata-eval90.8%

        \[\leadsto \left(\left(t + z\right) + \left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      4. fma-def90.8%

        \[\leadsto \left(\left(t + z\right) + \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, {1}^{0.3333333333333333} \cdot \left(x \cdot \log y\right)\right)}\right) + y \cdot i \]
      5. pow-base-190.8%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{1} \cdot \left(x \cdot \log y\right)\right)\right) + y \cdot i \]
      6. *-lft-identity90.8%

        \[\leadsto \left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, \color{blue}{x \cdot \log y}\right)\right) + y \cdot i \]
    6. Simplified90.8%

      \[\leadsto \color{blue}{\left(\left(t + z\right) + \mathsf{fma}\left(\log c, b + -0.5, x \cdot \log y\right)\right)} + y \cdot i \]
    7. Taylor expanded in b around inf 84.0%

      \[\leadsto \left(\left(t + z\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    8. Step-by-step derivation
      1. *-commutative84.0%

        \[\leadsto \left(\left(t + z\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    9. Simplified84.0%

      \[\leadsto \left(\left(t + z\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.55 \cdot 10^{+47}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(b \cdot \log c + \left(z + t\right)\right)\\ \end{array} \]

Alternative 10: 59.8% accurate, 2.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 3.15 \cdot 10^{-21}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+19}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;a \leq 1.66 \cdot 10^{+128}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= a 3.15e-21)
   (fma y i z)
   (if (<= a 1.95e+19)
     (+ (* y i) (* b (log c)))
     (if (<= a 1.66e+128) (+ z (* y i)) (fma y i a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (a <= 3.15e-21) {
		tmp = fma(y, i, z);
	} else if (a <= 1.95e+19) {
		tmp = (y * i) + (b * log(c));
	} else if (a <= 1.66e+128) {
		tmp = z + (y * i);
	} else {
		tmp = fma(y, i, a);
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (a <= 3.15e-21)
		tmp = fma(y, i, z);
	elseif (a <= 1.95e+19)
		tmp = Float64(Float64(y * i) + Float64(b * log(c)));
	elseif (a <= 1.66e+128)
		tmp = Float64(z + Float64(y * i));
	else
		tmp = fma(y, i, a);
	end
	return tmp
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.15e-21], N[(y * i + z), $MachinePrecision], If[LessEqual[a, 1.95e+19], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.66e+128], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(y * i + a), $MachinePrecision]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.15 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\

\mathbf{elif}\;a \leq 1.95 \cdot 10^{+19}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

\mathbf{elif}\;a \leq 1.66 \cdot 10^{+128}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 3.15e-21

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 45.1%

      \[\leadsto \color{blue}{z} + y \cdot i \]
    3. Taylor expanded in z around 0 45.1%

      \[\leadsto \color{blue}{z + i \cdot y} \]
    4. Step-by-step derivation
      1. +-commutative45.1%

        \[\leadsto \color{blue}{i \cdot y + z} \]
      2. *-commutative45.1%

        \[\leadsto \color{blue}{y \cdot i} + z \]
      3. fma-udef45.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
    5. Simplified45.1%

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

    if 3.15e-21 < a < 1.95e19

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.5%

        \[\leadsto \left(\left(\left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \log y} \cdot \sqrt[3]{x \cdot \log y}\right) \cdot \sqrt[3]{x \cdot \log y}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. pow399.5%

        \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(\left(\left(\left(\color{blue}{{\left(\sqrt[3]{x \cdot \log y}\right)}^{3}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Taylor expanded in b around inf 67.4%

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    5. Step-by-step derivation
      1. *-commutative67.4%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    6. Simplified67.4%

      \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]

    if 1.95e19 < a < 1.6599999999999999e128

    1. Initial program 100.0%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 51.0%

      \[\leadsto \color{blue}{z} + y \cdot i \]

    if 1.6599999999999999e128 < a

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 56.0%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around 0 56.0%

      \[\leadsto \color{blue}{a + i \cdot y} \]
    4. Step-by-step derivation
      1. +-commutative56.0%

        \[\leadsto \color{blue}{i \cdot y + a} \]
      2. *-commutative56.0%

        \[\leadsto \color{blue}{y \cdot i} + a \]
      3. fma-def56.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, a\right)} \]
    5. Simplified56.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, a\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification48.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.15 \cdot 10^{-21}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+19}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;a \leq 1.66 \cdot 10^{+128}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \]

Alternative 11: 59.9% accurate, 2.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 4.1999999999999999e128

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 45.2%

      \[\leadsto \color{blue}{z} + y \cdot i \]

    if 4.1999999999999999e128 < a

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 56.0%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around 0 56.0%

      \[\leadsto \color{blue}{a + i \cdot y} \]
    4. Step-by-step derivation
      1. +-commutative56.0%

        \[\leadsto \color{blue}{i \cdot y + a} \]
      2. *-commutative56.0%

        \[\leadsto \color{blue}{y \cdot i} + a \]
      3. fma-def56.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, a\right)} \]
    5. Simplified56.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{+128}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \]

Alternative 12: 59.9% accurate, 2.1× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 5.8 \cdot 10^{+128}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= a 5.8e+128) (fma y i z) (fma y i a)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (a <= 5.8e+128) {
		tmp = fma(y, i, z);
	} else {
		tmp = fma(y, i, a);
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (a <= 5.8e+128)
		tmp = fma(y, i, z);
	else
		tmp = fma(y, i, a);
	end
	return tmp
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.8e+128], N[(y * i + z), $MachinePrecision], N[(y * i + a), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.8 \cdot 10^{+128}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.8000000000000001e128

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 45.2%

      \[\leadsto \color{blue}{z} + y \cdot i \]
    3. Taylor expanded in z around 0 45.2%

      \[\leadsto \color{blue}{z + i \cdot y} \]
    4. Step-by-step derivation
      1. +-commutative45.2%

        \[\leadsto \color{blue}{i \cdot y + z} \]
      2. *-commutative45.2%

        \[\leadsto \color{blue}{y \cdot i} + z \]
      3. fma-udef45.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
    5. Simplified45.2%

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

    if 5.8000000000000001e128 < a

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 56.0%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around 0 56.0%

      \[\leadsto \color{blue}{a + i \cdot y} \]
    4. Step-by-step derivation
      1. +-commutative56.0%

        \[\leadsto \color{blue}{i \cdot y + a} \]
      2. *-commutative56.0%

        \[\leadsto \color{blue}{y \cdot i} + a \]
      3. fma-def56.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, a\right)} \]
    5. Simplified56.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 5.8 \cdot 10^{+128}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \]

Alternative 13: 34.1% accurate, 30.7× speedup?

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+57}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 1.10000000000000007e-126

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 82.6%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+82.6%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative82.6%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative82.6%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg82.6%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval82.6%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+82.6%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative82.6%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative82.6%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+82.6%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative82.6%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative82.6%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def82.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative82.6%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+82.6%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative82.6%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative82.6%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative82.6%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified82.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around 0 56.5%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
    6. Step-by-step derivation
      1. associate-+r+56.5%

        \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
      2. *-commutative56.5%

        \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
    7. Simplified56.5%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
    8. Taylor expanded in z around inf 21.2%

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

    if 1.10000000000000007e-126 < y < 1.20000000000000002e57

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 83.8%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+83.8%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative83.8%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative83.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg83.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval83.8%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+83.8%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative83.8%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative83.8%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+83.8%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative83.8%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative83.8%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def83.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative83.8%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+83.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative83.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative83.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative83.8%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified83.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around 0 67.8%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
    6. Step-by-step derivation
      1. associate-+r+67.8%

        \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
      2. *-commutative67.8%

        \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
    7. Simplified67.8%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
    8. Taylor expanded in a around inf 18.1%

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

    if 1.20000000000000002e57 < y

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 60.9%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around 0 52.6%

      \[\leadsto \color{blue}{i \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative52.6%

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified52.6%

      \[\leadsto \color{blue}{y \cdot i} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.1 \cdot 10^{-126}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+57}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]

Alternative 14: 53.8% accurate, 31.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e216

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 95.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+95.1%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative95.1%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative95.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg95.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval95.1%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+95.1%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative95.1%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative95.1%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+95.1%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative95.1%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative95.1%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+95.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified95.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around 0 95.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
    6. Step-by-step derivation
      1. associate-+r+95.1%

        \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
      2. *-commutative95.1%

        \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
    7. Simplified95.1%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
    8. Taylor expanded in z around inf 68.5%

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

    if -1.65e216 < z

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 39.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+216}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 15: 59.9% accurate, 31.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.10000000000000004e128

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in z around inf 45.2%

      \[\leadsto \color{blue}{z} + y \cdot i \]

    if 3.10000000000000004e128 < a

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in a around inf 56.0%

      \[\leadsto \color{blue}{a} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.1 \cdot 10^{+128}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 16: 38.3% accurate, 71.5× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 4.4 \cdot 10^{+128}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.4e+128) z a))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (a <= 4.4e+128) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (a <= 4.4d+128) then
        tmp = z
    else
        tmp = a
    end if
    code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (a <= 4.4e+128) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if a <= 4.4e+128:
		tmp = z
	else:
		tmp = a
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (a <= 4.4e+128)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (a <= 4.4e+128)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.4e+128], z, a]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.4 \cdot 10^{+128}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 4.40000000000000033e128

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 85.0%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+85.0%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative85.0%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative85.0%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg85.0%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval85.0%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+85.0%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative85.0%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative85.0%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+85.0%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative85.0%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative85.0%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def85.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative85.0%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+85.0%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative85.0%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative85.0%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative85.0%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified85.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around 0 68.0%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
    6. Step-by-step derivation
      1. associate-+r+68.0%

        \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
      2. *-commutative68.0%

        \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
    7. Simplified68.0%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
    8. Taylor expanded in z around inf 19.8%

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

    if 4.40000000000000033e128 < a

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in x around 0 94.3%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    3. Step-by-step derivation
      1. associate-+r+94.3%

        \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
      2. +-commutative94.3%

        \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
      3. *-commutative94.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
      4. sub-neg94.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
      5. metadata-eval94.3%

        \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
      6. associate-+r+94.3%

        \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
      7. +-commutative94.3%

        \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      8. +-commutative94.3%

        \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      9. associate-+r+94.3%

        \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
      10. +-commutative94.3%

        \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
      11. *-commutative94.3%

        \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
      12. fma-def94.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
      13. +-commutative94.3%

        \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
      14. associate-+r+94.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
      15. +-commutative94.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
      16. +-commutative94.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
      17. +-commutative94.3%

        \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
    4. Simplified94.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around 0 77.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
    6. Step-by-step derivation
      1. associate-+r+77.1%

        \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
      2. *-commutative77.1%

        \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
    7. Simplified77.1%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
    8. Taylor expanded in a around inf 45.7%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification23.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.4 \cdot 10^{+128}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 17: 23.4% accurate, 219.0× speedup?

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Taylor expanded in x around 0 86.4%

    \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
  3. Step-by-step derivation
    1. associate-+r+86.4%

      \[\leadsto \left(a + \color{blue}{\left(\left(t + z\right) + \log c \cdot \left(b - 0.5\right)\right)}\right) + y \cdot i \]
    2. +-commutative86.4%

      \[\leadsto \left(a + \left(\color{blue}{\left(z + t\right)} + \log c \cdot \left(b - 0.5\right)\right)\right) + y \cdot i \]
    3. *-commutative86.4%

      \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c}\right)\right) + y \cdot i \]
    4. sub-neg86.4%

      \[\leadsto \left(a + \left(\left(z + t\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c\right)\right) + y \cdot i \]
    5. metadata-eval86.4%

      \[\leadsto \left(a + \left(\left(z + t\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c\right)\right) + y \cdot i \]
    6. associate-+r+86.4%

      \[\leadsto \color{blue}{\left(\left(a + \left(z + t\right)\right) + \left(b + -0.5\right) \cdot \log c\right)} + y \cdot i \]
    7. +-commutative86.4%

      \[\leadsto \left(\color{blue}{\left(\left(z + t\right) + a\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
    8. +-commutative86.4%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
    9. associate-+r+86.4%

      \[\leadsto \left(\color{blue}{\left(t + \left(z + a\right)\right)} + \left(b + -0.5\right) \cdot \log c\right) + y \cdot i \]
    10. +-commutative86.4%

      \[\leadsto \color{blue}{\left(\left(b + -0.5\right) \cdot \log c + \left(t + \left(z + a\right)\right)\right)} + y \cdot i \]
    11. *-commutative86.4%

      \[\leadsto \left(\color{blue}{\log c \cdot \left(b + -0.5\right)} + \left(t + \left(z + a\right)\right)\right) + y \cdot i \]
    12. fma-def86.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b + -0.5, t + \left(z + a\right)\right)} + y \cdot i \]
    13. +-commutative86.4%

      \[\leadsto \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, t + \left(z + a\right)\right) + y \cdot i \]
    14. associate-+r+86.4%

      \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(t + z\right) + a}\right) + y \cdot i \]
    15. +-commutative86.4%

      \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{\left(z + t\right)} + a\right) + y \cdot i \]
    16. +-commutative86.4%

      \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, \color{blue}{a + \left(z + t\right)}\right) + y \cdot i \]
    17. +-commutative86.4%

      \[\leadsto \mathsf{fma}\left(\log c, -0.5 + b, a + \color{blue}{\left(t + z\right)}\right) + y \cdot i \]
  4. Simplified86.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, a + \left(t + z\right)\right)} + y \cdot i \]
  5. Taylor expanded in b around 0 69.4%

    \[\leadsto \color{blue}{\left(a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\right)} + y \cdot i \]
  6. Step-by-step derivation
    1. associate-+r+69.4%

      \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
    2. *-commutative69.4%

      \[\leadsto \left(\left(a + t\right) + \left(z + \color{blue}{\log c \cdot -0.5}\right)\right) + y \cdot i \]
  7. Simplified69.4%

    \[\leadsto \color{blue}{\left(\left(a + t\right) + \left(z + \log c \cdot -0.5\right)\right)} + y \cdot i \]
  8. Taylor expanded in a around inf 15.6%

    \[\leadsto \color{blue}{a} \]
  9. Final simplification15.6%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023301 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))