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

Percentage Accurate: 99.8% → 99.8%
Time: 18.3s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\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.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, z + t\right) + a\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (- b 0.5) (log c) (+ (fma x (log y) (+ z 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), (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), Float64(z + t)) + a)))
end
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] + N[(z + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, z + t\right) + a\right)\right)
\end{array}
Derivation
  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. +-commutative99.9%

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

      \[\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. associate-+l+99.9%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + t\right) + z\right) + a\right)}\right) \]
    9. 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 + t\right) + z\right) + a\right)}\right) \]
    10. associate-+l+99.9%

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, \color{blue}{z + t}\right) + a\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, z + t\right) + a\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, z + t\right) + a\right)\right) \]

Alternative 2: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\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
 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (- 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 ((a + (t + (z + (x * log(y))))) + ((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 = ((a + (t + (z + (x * log(y))))) + ((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 ((a + (t + (z + (x * Math.log(y))))) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return ((a + (t + (z + (x * math.log(y))))) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c))) + (y * i);
end
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[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Derivation
  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. Final simplification99.9%

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

Alternative 3: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
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)));
}
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
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)));
}
def code(x, y, z, t, a, b, c, i):
	return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
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
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
end
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}

\\
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.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 b around inf 98.8%

    \[\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. *-commutative98.8%

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

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

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

Alternative 4: 83.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ a + \left(\left(z + t\right) + \mathsf{fma}\left(y, i, \log c \cdot \left(b + -0.5\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ a (+ (+ z t) (fma y i (* (log c) (+ b -0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a + ((z + t) + fma(y, i, (log(c) * (b + -0.5))));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(a + Float64(Float64(z + t) + fma(y, i, Float64(log(c) * Float64(b + -0.5)))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(N[(z + t), $MachinePrecision] + N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a + \left(\left(z + t\right) + \mathsf{fma}\left(y, i, \log c \cdot \left(b + -0.5\right)\right)\right)
\end{array}
Derivation
  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. +-commutative99.9%

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

      \[\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. associate-+l+99.9%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + t\right) + z\right) + a\right)}\right) \]
    9. 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 + t\right) + z\right) + a\right)}\right) \]
    10. associate-+l+99.9%

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, \color{blue}{z + t}\right) + a\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, z + t\right) + a\right)\right)} \]
  4. Taylor expanded in x around 0 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 63.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -0.0155:\\ \;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\ \mathbf{elif}\;i \leq 1.4 \cdot 10^{-41}:\\ \;\;\;\;\left(z + a\right) + \log c \cdot \left(b + -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot -0.5\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= i -0.0155)
   (+ (* y i) (+ (+ z t) a))
   (if (<= i 1.4e-41)
     (+ (+ z a) (* (log c) (+ b -0.5)))
     (+ (* y i) (+ a (+ z (* (log c) -0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -0.0155) {
		tmp = (y * i) + ((z + t) + a);
	} else if (i <= 1.4e-41) {
		tmp = (z + a) + (log(c) * (b + -0.5));
	} else {
		tmp = (y * i) + (a + (z + (log(c) * -0.5)));
	}
	return tmp;
}
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 (i <= (-0.0155d0)) then
        tmp = (y * i) + ((z + t) + a)
    else if (i <= 1.4d-41) then
        tmp = (z + a) + (log(c) * (b + (-0.5d0)))
    else
        tmp = (y * i) + (a + (z + (log(c) * (-0.5d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -0.0155) {
		tmp = (y * i) + ((z + t) + a);
	} else if (i <= 1.4e-41) {
		tmp = (z + a) + (Math.log(c) * (b + -0.5));
	} else {
		tmp = (y * i) + (a + (z + (Math.log(c) * -0.5)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if i <= -0.0155:
		tmp = (y * i) + ((z + t) + a)
	elif i <= 1.4e-41:
		tmp = (z + a) + (math.log(c) * (b + -0.5))
	else:
		tmp = (y * i) + (a + (z + (math.log(c) * -0.5)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (i <= -0.0155)
		tmp = Float64(Float64(y * i) + Float64(Float64(z + t) + a));
	elseif (i <= 1.4e-41)
		tmp = Float64(Float64(z + a) + Float64(log(c) * Float64(b + -0.5)));
	else
		tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(log(c) * -0.5))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (i <= -0.0155)
		tmp = (y * i) + ((z + t) + a);
	elseif (i <= 1.4e-41)
		tmp = (z + a) + (log(c) * (b + -0.5));
	else
		tmp = (y * i) + (a + (z + (log(c) * -0.5)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -0.0155], N[(N[(y * i), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.4e-41], N[(N[(z + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -0.0155:\\
\;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\

\mathbf{elif}\;i \leq 1.4 \cdot 10^{-41}:\\
\;\;\;\;\left(z + a\right) + \log c \cdot \left(b + -0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -0.0155

    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 88.6%

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

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

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

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

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

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

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

    if -0.0155 < i < 1.4000000000000001e-41

    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 82.2%

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

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

        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \log \left(e^{\color{blue}{\log c \cdot \left(b - 0.5\right)}}\right)\right) + y \cdot i \]
      3. exp-to-pow44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z + a\right) + \log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} \]
      4. metadata-eval67.3%

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

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

    if 1.4000000000000001e-41 < i

    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 94.6%

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

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

      \[\leadsto \color{blue}{\left(a + \left(z + -0.5 \cdot \log c\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. +-commutative68.4%

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

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

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

Alternative 6: 83.9% accurate, 1.9× speedup?

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

\\
y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(\left(z + t\right) + a\right)\right)
\end{array}
Derivation
  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 87.5%

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

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

Alternative 7: 66.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -5.6 \cdot 10^{-7} \lor \neg \left(i \leq 1.05 \cdot 10^{-41}\right):\\ \;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) + \log c \cdot \left(b + -0.5\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= i -5.6e-7) (not (<= i 1.05e-41)))
   (+ (* y i) (+ (+ z t) a))
   (+ (+ z a) (* (log c) (+ b -0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((i <= -5.6e-7) || !(i <= 1.05e-41)) {
		tmp = (y * i) + ((z + t) + a);
	} else {
		tmp = (z + a) + (log(c) * (b + -0.5));
	}
	return tmp;
}
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 ((i <= (-5.6d-7)) .or. (.not. (i <= 1.05d-41))) then
        tmp = (y * i) + ((z + t) + a)
    else
        tmp = (z + a) + (log(c) * (b + (-0.5d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((i <= -5.6e-7) || !(i <= 1.05e-41)) {
		tmp = (y * i) + ((z + t) + a);
	} else {
		tmp = (z + a) + (Math.log(c) * (b + -0.5));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (i <= -5.6e-7) or not (i <= 1.05e-41):
		tmp = (y * i) + ((z + t) + a)
	else:
		tmp = (z + a) + (math.log(c) * (b + -0.5))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((i <= -5.6e-7) || !(i <= 1.05e-41))
		tmp = Float64(Float64(y * i) + Float64(Float64(z + t) + a));
	else
		tmp = Float64(Float64(z + a) + Float64(log(c) * Float64(b + -0.5)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((i <= -5.6e-7) || ~((i <= 1.05e-41)))
		tmp = (y * i) + ((z + t) + a);
	else
		tmp = (z + a) + (log(c) * (b + -0.5));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -5.6e-7], N[Not[LessEqual[i, 1.05e-41]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -5.6 \cdot 10^{-7} \lor \neg \left(i \leq 1.05 \cdot 10^{-41}\right):\\
\;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -5.60000000000000038e-7 or 1.05000000000000006e-41 < i

    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 91.9%

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

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

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

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

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

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

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

    if -5.60000000000000038e-7 < i < 1.05000000000000006e-41

    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 82.2%

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

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

        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \log \left(e^{\color{blue}{\log c \cdot \left(b - 0.5\right)}}\right)\right) + y \cdot i \]
      3. exp-to-pow44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z + a\right) + \log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} \]
      4. metadata-eval67.3%

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

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

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

Alternative 8: 60.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 3.6 \cdot 10^{+119}:\\ \;\;\;\;y \cdot i + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= a 3.6e+119)
   (+ (* y i) (+ z (* (- b 0.5) (log c))))
   (+ (* y i) (+ (+ z 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.6e+119) {
		tmp = (y * i) + (z + ((b - 0.5) * log(c)));
	} else {
		tmp = (y * i) + ((z + t) + a);
	}
	return tmp;
}
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.6d+119) then
        tmp = (y * i) + (z + ((b - 0.5d0) * log(c)))
    else
        tmp = (y * i) + ((z + t) + a)
    end if
    code = tmp
end function
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.6e+119) {
		tmp = (y * i) + (z + ((b - 0.5) * Math.log(c)));
	} else {
		tmp = (y * i) + ((z + t) + a);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if a <= 3.6e+119:
		tmp = (y * i) + (z + ((b - 0.5) * math.log(c)))
	else:
		tmp = (y * i) + ((z + t) + a)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (a <= 3.6e+119)
		tmp = Float64(Float64(y * i) + Float64(z + Float64(Float64(b - 0.5) * log(c))));
	else
		tmp = Float64(Float64(y * i) + Float64(Float64(z + t) + a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (a <= 3.6e+119)
		tmp = (y * i) + (z + ((b - 0.5) * log(c)));
	else
		tmp = (y * i) + ((z + t) + a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.6e+119], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{+119}:\\
\;\;\;\;y \cdot i + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\

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


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

    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.5%

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

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

        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \log \left(e^{\color{blue}{\log c \cdot \left(b - 0.5\right)}}\right)\right) + y \cdot i \]
      3. exp-to-pow47.3%

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

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

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

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

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

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

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

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

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

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

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

    if 3.60000000000000001e119 < a

    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 x around 0 91.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.2%

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

Alternative 9: 68.8% accurate, 1.9× speedup?

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

\\
y \cdot i + \left(\left(z + a\right) + \log c \cdot \left(b + -0.5\right)\right)
\end{array}
Derivation
  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 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 74.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+174} \lor \neg \left(b \leq 10^{+213}\right):\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= b -2.8e+174) (not (<= b 1e+213)))
   (+ (* y i) (* b (log c)))
   (+ (* y i) (+ (+ z t) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -2.8e+174) || !(b <= 1e+213)) {
		tmp = (y * i) + (b * log(c));
	} else {
		tmp = (y * i) + ((z + t) + a);
	}
	return tmp;
}
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 ((b <= (-2.8d+174)) .or. (.not. (b <= 1d+213))) then
        tmp = (y * i) + (b * log(c))
    else
        tmp = (y * i) + ((z + t) + a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -2.8e+174) || !(b <= 1e+213)) {
		tmp = (y * i) + (b * Math.log(c));
	} else {
		tmp = (y * i) + ((z + t) + a);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (b <= -2.8e+174) or not (b <= 1e+213):
		tmp = (y * i) + (b * math.log(c))
	else:
		tmp = (y * i) + ((z + t) + a)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((b <= -2.8e+174) || !(b <= 1e+213))
		tmp = Float64(Float64(y * i) + Float64(b * log(c)));
	else
		tmp = Float64(Float64(y * i) + Float64(Float64(z + t) + a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((b <= -2.8e+174) || ~((b <= 1e+213)))
		tmp = (y * i) + (b * log(c));
	else
		tmp = (y * i) + ((z + t) + a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.8e+174], N[Not[LessEqual[b, 1e+213]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+174} \lor \neg \left(b \leq 10^{+213}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.7999999999999999e174 or 9.99999999999999984e212 < b

    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 0 89.8%

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

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

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

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

    if -2.7999999999999999e174 < b < 9.99999999999999984e212

    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 87.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+174} \lor \neg \left(b \leq 10^{+213}\right):\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(z + t\right) + a\right)\\ \end{array} \]

Alternative 11: 67.4% accurate, 24.3× speedup?

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

\\
y \cdot i + \left(\left(z + t\right) + a\right)
\end{array}
Derivation
  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 87.5%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
  6. Final simplification70.8%

    \[\leadsto y \cdot i + \left(\left(z + t\right) + a\right) \]

Alternative 12: 41.6% accurate, 31.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+175}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= z -5.4e+175) z (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -5.4e+175) {
		tmp = z;
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
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 <= (-5.4d+175)) then
        tmp = z
    else
        tmp = a + (y * i)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -5.4e+175) {
		tmp = z;
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -5.4e+175:
		tmp = z
	else:
		tmp = a + (y * i)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -5.4e+175)
		tmp = z;
	else
		tmp = Float64(a + Float64(y * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -5.4e+175)
		tmp = z;
	else
		tmp = a + (y * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -5.4e+175], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+175}:\\
\;\;\;\;z\\

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


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

    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 99.9%

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

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

      \[\leadsto \color{blue}{z} + y \cdot i \]
    5. Taylor expanded in z around inf 62.6%

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

    if -5.4000000000000002e175 < z

    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 44.0%

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

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

Alternative 13: 43.6% accurate, 31.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+103}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= z -7e+103) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -7e+103) {
		tmp = z + (y * i);
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
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 <= (-7d+103)) then
        tmp = z + (y * i)
    else
        tmp = a + (y * i)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -7e+103) {
		tmp = z + (y * i);
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -7e+103:
		tmp = z + (y * i)
	else:
		tmp = a + (y * i)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -7e+103)
		tmp = Float64(z + Float64(y * i));
	else
		tmp = Float64(a + Float64(y * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -7e+103)
		tmp = z + (y * i);
	else
		tmp = a + (y * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7e+103], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+103}:\\
\;\;\;\;z + y \cdot i\\

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


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

    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.2%

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

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

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

    if -7e103 < z

    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 43.5%

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

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

Alternative 14: 30.5% accurate, 43.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.9 \cdot 10^{+71}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.9e+71) a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= 1.9e+71) {
		tmp = a;
	} else {
		tmp = y * i;
	}
	return tmp;
}
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.9d+71) then
        tmp = a
    else
        tmp = y * i
    end if
    code = tmp
end function
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.9e+71) {
		tmp = a;
	} else {
		tmp = y * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= 1.9e+71:
		tmp = a
	else:
		tmp = y * i
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= 1.9e+71)
		tmp = a;
	else
		tmp = Float64(y * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= 1.9e+71)
		tmp = a;
	else
		tmp = y * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.9e+71], a, N[(y * i), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.9 \cdot 10^{+71}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.9e71

    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 84.0%

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

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

        \[\leadsto \left(\left(\left(z + t\right) + a\right) + \log \left(e^{\color{blue}{\log c \cdot \left(b - 0.5\right)}}\right)\right) + y \cdot i \]
      3. exp-to-pow41.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.9e71 < 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. +-commutative99.9%

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

        \[\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. associate-+l+99.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + t\right) + z\right) + a\right)}\right) \]
      9. 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 + t\right) + z\right) + a\right)}\right) \]
      10. associate-+l+99.9%

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

        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, \color{blue}{z + t}\right) + a\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, z + t\right) + a\right)\right)} \]
    4. Taylor expanded in y around inf 54.4%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    6. Simplified54.4%

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

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

Alternative 15: 21.3% accurate, 71.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+79}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.65e+79) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.65e+79) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
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 <= (-2.65d+79)) then
        tmp = z
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.65e+79) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -2.65e+79:
		tmp = z
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -2.65e+79)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -2.65e+79)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.65e+79], z, a]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+79}:\\
\;\;\;\;z\\

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


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

    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 93.5%

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

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

      \[\leadsto \color{blue}{z} + y \cdot i \]
    5. Taylor expanded in z around inf 42.3%

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

    if -2.64999999999999989e79 < z

    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 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 16.5% accurate, 219.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
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
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
def code(x, y, z, t, a, b, c, i):
	return a
function code(x, y, z, t, a, b, c, i)
	return a
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  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 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  9. Final simplification19.2%

    \[\leadsto a \]

Reproduce

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