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

Percentage Accurate: 99.8% → 99.8%
Time: 18.6s
Alternatives: 23
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 23 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, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ 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), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(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[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\mathsf{fma}\left(y, i, x \cdot \log y + \left(\left(z + t\right) + \left(a + \left(b + -0.5\right) \cdot \log c\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. fma-udef99.5%

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

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

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

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

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

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

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

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

      \[\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) \]
    10. associate-+l+99.5%

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

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

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

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

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

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

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

Alternative 3: 93.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.1 \cdot 10^{+127}:\\ \;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, t_1\right)\right)\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+65}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(b + -0.5\right) \cdot \log c + \left(z + \left(t + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(t_1 + y \cdot i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -2.1e+127)
     (+ a (+ z (fma i y t_1)))
     (if (<= x 1.9e+65)
       (fma y i (+ (* (+ b -0.5) (log c)) (+ z (+ t a))))
       (+ a (+ t (+ z (+ t_1 (* y i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -2.1e+127) {
		tmp = a + (z + fma(i, y, t_1));
	} else if (x <= 1.9e+65) {
		tmp = fma(y, i, (((b + -0.5) * log(c)) + (z + (t + a))));
	} else {
		tmp = a + (t + (z + (t_1 + (y * i))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -2.1e+127)
		tmp = Float64(a + Float64(z + fma(i, y, t_1)));
	elseif (x <= 1.9e+65)
		tmp = fma(y, i, Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(z + Float64(t + a))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(y * i)))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e+127], N[(a + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+65], N[(y * i + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+127}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, t_1\right)\right)\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(b + -0.5\right) \cdot \log c + \left(z + \left(t + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.09999999999999992e127

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.4%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def91.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified91.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around 0 84.4%

      \[\leadsto a + \color{blue}{\left(z + \left(i \cdot y + x \cdot \log y\right)\right)} \]
    9. Step-by-step derivation
      1. fma-def84.4%

        \[\leadsto a + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right) \]
      2. *-commutative84.4%

        \[\leadsto a + \left(z + \mathsf{fma}\left(i, y, \color{blue}{\log y \cdot x}\right)\right) \]
    10. Simplified84.4%

      \[\leadsto a + \color{blue}{\left(z + \mathsf{fma}\left(i, y, \log y \cdot x\right)\right)} \]

    if -2.09999999999999992e127 < x < 1.90000000000000006e65

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.90000000000000006e65 < x

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.7%

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

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

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

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

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

Alternative 4: 90.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;a \leq 3.2 \cdot 10^{+136}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + \left(t_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t_1\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= a 3.2e+136)
     (+ (* y i) (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
     (+ a (+ t (+ z (fma i y t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (a <= 3.2e+136) {
		tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
	} else {
		tmp = a + (t + (z + fma(i, y, t_1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (a <= 3.2e+136)
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + fma(i, y, t_1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3.2e+136], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 3.2 \cdot 10^{+136}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

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


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

    1. Initial program 99.4%

      \[\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. Add Preprocessing
    3. Taylor expanded in a around 0 86.0%

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

    if 3.19999999999999988e136 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.9%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def92.4%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified92.4%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.9%

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

Alternative 5: 99.8% accurate, 1.0× speedup?

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

\\
\left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) + y \cdot i
\end{array}
Derivation
  1. Initial program 99.5%

    \[\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. Add Preprocessing
  3. Final simplification99.5%

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

Alternative 6: 93.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{+124}:\\ \;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, t_1\right)\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+65}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(t_1 + y \cdot i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -5.8e+124)
     (+ a (+ z (fma i y t_1)))
     (if (<= x 2e+65)
       (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
       (+ a (+ t (+ z (+ t_1 (* y i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -5.8e+124) {
		tmp = a + (z + fma(i, y, t_1));
	} else if (x <= 2e+65) {
		tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
	} else {
		tmp = a + (t + (z + (t_1 + (y * i))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -5.8e+124)
		tmp = Float64(a + Float64(z + fma(i, y, t_1)));
	elseif (x <= 2e+65)
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(y * i)))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e+124], N[(a + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+65], 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], N[(a + N[(t + N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+124}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, t_1\right)\right)\\

\mathbf{elif}\;x \leq 2 \cdot 10^{+65}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.80000000000000043e124

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.4%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def91.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified91.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around 0 84.4%

      \[\leadsto a + \color{blue}{\left(z + \left(i \cdot y + x \cdot \log y\right)\right)} \]
    9. Step-by-step derivation
      1. fma-def84.4%

        \[\leadsto a + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right) \]
      2. *-commutative84.4%

        \[\leadsto a + \left(z + \mathsf{fma}\left(i, y, \color{blue}{\log y \cdot x}\right)\right) \]
    10. Simplified84.4%

      \[\leadsto a + \color{blue}{\left(z + \mathsf{fma}\left(i, y, \log y \cdot x\right)\right)} \]

    if -5.80000000000000043e124 < x < 2e65

    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. Add Preprocessing
    3. Taylor expanded in x around 0 98.3%

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

    if 2e65 < x

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.7%

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

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

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

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

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

Alternative 7: 87.2% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+163} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+215}\right):\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -3.9999999999999998e163 or 5.0000000000000001e215 < (-.f64 b 1/2)

    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. Add Preprocessing
    3. Taylor expanded in x around 0 90.5%

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

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

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

    if -3.9999999999999998e163 < (-.f64 b 1/2) < 5.0000000000000001e215

    1. Initial program 99.4%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.3%

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

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

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

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

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

Alternative 8: 73.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+163} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+215}\right):\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -3.9999999999999998e163 or 5.0000000000000001e215 < (-.f64 b 1/2)

    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. Add Preprocessing
    3. Taylor expanded in x around 0 90.5%

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

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

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

    if -3.9999999999999998e163 < (-.f64 b 1/2) < 5.0000000000000001e215

    1. Initial program 99.4%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.3%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def92.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified92.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around 0 74.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+163} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+215}\right):\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 93.5% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := z + \left(x \cdot \log y + y \cdot i\right)\\
\mathbf{if}\;x \leq -3 \cdot 10^{+126}:\\
\;\;\;\;a + t_1\\

\mathbf{elif}\;x \leq 2 \cdot 10^{+65}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.0000000000000002e126

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.4%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def91.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified91.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around 0 84.4%

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

    if -3.0000000000000002e126 < x < 2e65

    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. Add Preprocessing
    3. Taylor expanded in x around 0 98.3%

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

    if 2e65 < x

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.7%

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

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

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

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

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

Alternative 10: 81.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := z + \left(x \cdot \log y + y \cdot i\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+126}:\\
\;\;\;\;a + t_1\\

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

\mathbf{else}:\\
\;\;\;\;a + \left(t + t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.49999999999999944e126

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.4%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def91.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified91.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around 0 84.4%

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

    if -8.49999999999999944e126 < x < 2e65

    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. Add Preprocessing
    3. Taylor expanded in x around 0 98.3%

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

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

    if 2e65 < x

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.7%

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

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

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

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

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

Alternative 11: 72.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.1 \cdot 10^{-121}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-58}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(y, i, z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y 2.1e-121)
   (+ a (+ t (+ z (* x (log y)))))
   (if (<= y 6e-58)
     (+ a (+ z (* (log c) (- b 0.5))))
     (+ a (+ t (fma y i z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= 2.1e-121) {
		tmp = a + (t + (z + (x * log(y))));
	} else if (y <= 6e-58) {
		tmp = a + (z + (log(c) * (b - 0.5)));
	} else {
		tmp = a + (t + fma(y, i, z));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= 2.1e-121)
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))));
	elseif (y <= 6e-58)
		tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))));
	else
		tmp = Float64(a + Float64(t + fma(y, i, z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.1e-121], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-58], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.1 \cdot 10^{-121}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-58}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in y around 0 98.9%

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

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

    if 2.0999999999999999e-121 < y < 6.00000000000000015e-58

    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. Add Preprocessing
    3. Taylor expanded in x around 0 93.4%

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

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

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

    if 6.00000000000000015e-58 < y

    1. Initial program 99.2%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.0%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.0%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.0%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.0%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def86.4%

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 73.6%

      \[\leadsto a + \color{blue}{\left(t + \left(z + i \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. +-commutative73.6%

        \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      2. *-commutative73.6%

        \[\leadsto a + \left(t + \left(\color{blue}{y \cdot i} + z\right)\right) \]
      3. fma-def73.6%

        \[\leadsto a + \left(t + \color{blue}{\mathsf{fma}\left(y, i, z\right)}\right) \]
    10. Simplified73.6%

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

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

Alternative 12: 72.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+173} \lor \neg \left(x \leq 1.12 \cdot 10^{+220}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(y, i, z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -1.9e+173) (not (<= x 1.12e+220)))
   (+ a (* x (log y)))
   (+ a (+ t (fma y i z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -1.9e+173) || !(x <= 1.12e+220)) {
		tmp = a + (x * log(y));
	} else {
		tmp = a + (t + fma(y, i, z));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -1.9e+173) || !(x <= 1.12e+220))
		tmp = Float64(a + Float64(x * log(y)));
	else
		tmp = Float64(a + Float64(t + fma(y, i, z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.9e+173], N[Not[LessEqual[x, 1.12e+220]], $MachinePrecision]], N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+173} \lor \neg \left(x \leq 1.12 \cdot 10^{+220}\right):\\
\;\;\;\;a + x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.90000000000000005e173 or 1.12000000000000006e220 < x

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.5%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def93.0%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified93.0%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around inf 67.6%

      \[\leadsto a + \color{blue}{x \cdot \log y} \]
    9. Step-by-step derivation
      1. *-commutative67.6%

        \[\leadsto a + \color{blue}{\log y \cdot x} \]
    10. Simplified67.6%

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

    if -1.90000000000000005e173 < x < 1.12000000000000006e220

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.6%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def80.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified80.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 72.4%

      \[\leadsto a + \color{blue}{\left(t + \left(z + i \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. +-commutative72.4%

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

        \[\leadsto a + \left(t + \left(\color{blue}{y \cdot i} + z\right)\right) \]
      3. fma-def72.4%

        \[\leadsto a + \left(t + \color{blue}{\mathsf{fma}\left(y, i, z\right)}\right) \]
    10. Simplified72.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+173} \lor \neg \left(x \leq 1.12 \cdot 10^{+220}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(y, i, z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 72.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+174} \lor \neg \left(x \leq 4.6 \cdot 10^{+220}\right):\\
\;\;\;\;a + x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.2000000000000003e174 or 4.59999999999999993e220 < x

    1. Initial program 97.5%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt97.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow397.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg97.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval97.5%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def93.0%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified93.0%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around inf 67.6%

      \[\leadsto a + \color{blue}{x \cdot \log y} \]
    9. Step-by-step derivation
      1. *-commutative67.6%

        \[\leadsto a + \color{blue}{\log y \cdot x} \]
    10. Simplified67.6%

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

    if -7.2000000000000003e174 < x < 4.59999999999999993e220

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.6%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def80.1%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified80.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 72.4%

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

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

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

        \[\leadsto a + \left(\left(z + t\right) + \color{blue}{y \cdot i}\right) \]
    10. Simplified72.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+174} \lor \neg \left(x \leq 4.6 \cdot 10^{+220}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;a + \left(\left(z + t\right) + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 75.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.12 \cdot 10^{+25}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(y, i, z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y 1.12e+25) (+ a (+ t (+ z (* x (log y))))) (+ a (+ t (fma y i z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= 1.12e+25) {
		tmp = a + (t + (z + (x * log(y))));
	} else {
		tmp = a + (t + fma(y, i, z));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= 1.12e+25)
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))));
	else
		tmp = Float64(a + Float64(t + fma(y, i, z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.12e+25], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{+25}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in y around 0 95.1%

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

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

    if 1.1200000000000001e25 < y

    1. Initial program 99.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow398.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg98.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval98.9%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def85.8%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified85.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 74.9%

      \[\leadsto a + \color{blue}{\left(t + \left(z + i \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. +-commutative74.9%

        \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      2. *-commutative74.9%

        \[\leadsto a + \left(t + \left(\color{blue}{y \cdot i} + z\right)\right) \]
      3. fma-def74.9%

        \[\leadsto a + \left(t + \color{blue}{\mathsf{fma}\left(y, i, z\right)}\right) \]
    10. Simplified74.9%

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

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

Alternative 15: 71.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{+191} \lor \neg \left(b \leq 3.7 \cdot 10^{+215}\right):\\
\;\;\;\;b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.2000000000000001e191 or 3.69999999999999971e215 < 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. Add Preprocessing
    3. Taylor expanded in b around inf 63.1%

      \[\leadsto \color{blue}{b \cdot \log c} \]
    4. Step-by-step derivation
      1. *-commutative63.1%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    5. Simplified63.1%

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

    if -4.2000000000000001e191 < b < 3.69999999999999971e215

    1. Initial program 99.4%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.3%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def91.2%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified91.2%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 72.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.2 \cdot 10^{+191} \lor \neg \left(b \leq 3.7 \cdot 10^{+215}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + \left(\left(z + t\right) + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+174}:\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.2000000000000003e174

    1. Initial program 96.5%

      \[\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. Add Preprocessing
    3. Taylor expanded in x around inf 63.5%

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

    if -7.2000000000000003e174 < x

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.6%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def81.3%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified81.3%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in x around 0 70.0%

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

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

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

        \[\leadsto a + \left(\left(z + t\right) + \color{blue}{y \cdot i}\right) \]
    10. Simplified70.0%

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

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

Alternative 17: 29.9% accurate, 12.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.6 \cdot 10^{-219}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 8.6 \cdot 10^{-163}:\\
\;\;\;\;a\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+49}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 1.59999999999999999e-219 or 8.60000000000000017e-163 < y < 2.9e49

    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. Add Preprocessing
    3. Taylor expanded in z around inf 13.3%

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

    if 1.59999999999999999e-219 < y < 8.60000000000000017e-163

    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. Add Preprocessing
    3. Taylor expanded in a around inf 20.2%

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

    if 2.9e49 < y

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in y around inf 46.7%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.6 \cdot 10^{-219}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{-163}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+49}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 31.4% accurate, 12.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.8 \cdot 10^{-219}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 5 \cdot 10^{-162}:\\
\;\;\;\;t + a\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 6.7999999999999997e-219 or 5.00000000000000014e-162 < y < 1.99999999999999989e49

    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. Add Preprocessing
    3. Taylor expanded in z around inf 13.3%

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

    if 6.7999999999999997e-219 < y < 5.00000000000000014e-162

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.2%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.2%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.2%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.2%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def78.7%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified78.7%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in t around inf 35.2%

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

    if 1.99999999999999989e49 < y

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in y around inf 46.7%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.8 \cdot 10^{-219}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-162}:\\ \;\;\;\;t + a\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 44.9% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.8 \cdot 10^{+42}:\\
\;\;\;\;z + a\\

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


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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.5%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def79.7%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified79.7%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in z around inf 32.6%

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

    if 3.7999999999999998e42 < y

    1. Initial program 99.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow398.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg98.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval98.8%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def85.6%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified85.6%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in i around inf 56.6%

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

        \[\leadsto a + \color{blue}{y \cdot i} \]
    10. Simplified56.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3.8 \cdot 10^{+42}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 67.8% accurate, 24.3× speedup?

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

\\
a + \left(\left(z + t\right) + y \cdot i\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[\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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt99.2%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.2%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.2%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.2%

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

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

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

    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
  6. Step-by-step derivation
    1. fma-def82.5%

      \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
  7. Simplified82.5%

    \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
  8. Taylor expanded in x around 0 65.1%

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

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

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

      \[\leadsto a + \left(\left(z + t\right) + \color{blue}{y \cdot i}\right) \]
  10. Simplified65.1%

    \[\leadsto a + \color{blue}{\left(\left(z + t\right) + y \cdot i\right)} \]
  11. Final simplification65.1%

    \[\leadsto a + \left(\left(z + t\right) + y \cdot i\right) \]
  12. Add Preprocessing

Alternative 21: 40.5% accurate, 27.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.6 \cdot 10^{+112}:\\
\;\;\;\;z + a\\

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


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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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. pow399.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-neg99.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + 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-eval99.5%

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

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

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def82.2%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    7. Simplified82.2%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]
    8. Taylor expanded in z around inf 33.1%

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

    if 1.59999999999999993e112 < y

    1. Initial program 98.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. Add Preprocessing
    3. Taylor expanded in y around inf 50.8%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified50.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.6 \cdot 10^{+112}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 22.0% accurate, 36.4× speedup?

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

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 21.2%

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

    if -4.00000000000000012e83 < z

    1. Initial program 99.4%

      \[\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. Add Preprocessing
    3. Taylor expanded in a around inf 17.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+83}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 16.9% 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.5%

    \[\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. Add Preprocessing
  3. Taylor expanded in a around inf 17.7%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification17.7%

    \[\leadsto a \]
  5. Add Preprocessing

Reproduce

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