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

Percentage Accurate: 99.8% → 99.8%
Time: 18.5s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 88.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{+126}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\

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


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

    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 b around inf 96.9%

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

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

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

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

    if 2.24999999999999987e126 < 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. Taylor expanded in x around 0 94.3%

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

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

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

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

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

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

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

Alternative 3: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 4: 89.5% accurate, 1.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 b 1/2) < -9.99999999999999945e193

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999945e193 < (-.f64 b 1/2) < 2.0000000000000001e149

    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 b around inf 96.9%

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

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

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

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

    if 2.0000000000000001e149 < (-.f64 b 1/2)

    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 x around 0 91.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. Step-by-step derivation
      1. associate-+r+91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 59.0% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+165} \lor \neg \left(z \leq -2.35 \cdot 10^{+142}\right) \land z \leq -2.9 \cdot 10^{+87}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000001e165 or -2.35e142 < z < -2.8999999999999998e87

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

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

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

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

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

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

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

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

    if -8.5000000000000001e165 < z < -2.35e142 or -2.8999999999999998e87 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+165} \lor \neg \left(z \leq -2.35 \cdot 10^{+142}\right) \land z \leq -2.9 \cdot 10^{+87}:\\ \;\;\;\;y \cdot i + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 94.0% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+81} \lor \neg \left(x \leq 5.1 \cdot 10^{+33}\right):\\
\;\;\;\;\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.99999999999999921e80 or 5.0999999999999999e33 < 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. Taylor expanded in b around inf 99.8%

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

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

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

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

    if -9.99999999999999921e80 < x < 5.0999999999999999e33

    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 99.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. Step-by-step derivation
      1. associate-+r+99.3%

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

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

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

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

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

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

Alternative 7: 83.4% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+72} \lor \neg \left(x \leq 6.2 \cdot 10^{+34}\right):\\
\;\;\;\;\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.99999999999999992e72 or 6.19999999999999955e34 < 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. Taylor expanded in b around inf 99.8%

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

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

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

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

    if -4.99999999999999992e72 < x < 6.19999999999999955e34

    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 99.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. Step-by-step derivation
      1. associate-+r+99.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 59.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+220} \lor \neg \left(x \leq 3.1 \cdot 10^{+218}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.80000000000000009e220 or 3.1000000000000002e218 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -1.80000000000000009e220 < x < 3.1000000000000002e218

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

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

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

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

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

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

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

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

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

Alternative 9: 60.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+230} \lor \neg \left(b \leq 8.2 \cdot 10^{+167}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.5999999999999999e230 or 8.2e167 < 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 x around 0 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    11. Simplified80.2%

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

    if -2.5999999999999999e230 < b < 8.2e167

    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 84.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. Step-by-step derivation
      1. associate-+r+84.5%

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

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

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

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

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

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

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

Alternative 10: 59.5% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000007e74 < 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. Taylor expanded in x around 0 94.2%

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

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

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

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

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

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

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

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

Alternative 11: 56.1% accurate, 18.2× speedup?

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

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

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


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

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

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

    if -2.2000000000000001e158 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

Alternative 12: 42.7% accurate, 21.9× speedup?

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

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

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


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

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

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

    if -2.05000000000000002e158 < z

    1. Initial program 99.9%

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

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

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

Alternative 13: 27.4% accurate, 27.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.2 \cdot 10^{+157}:\\
\;\;\;\;y \cdot i\\

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


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

    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 a around inf 39.2%

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

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

    if 4.2e157 < 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. Taylor expanded in a around inf 75.1%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    4. Taylor expanded in a around inf 69.7%

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

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

Alternative 14: 52.3% accurate, 31.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.5% accurate, 43.8× speedup?

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

\\
a + y \cdot i
\end{array}
Derivation
  1. Initial program 99.9%

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

    \[\leadsto \color{blue}{a} + y \cdot i \]
  4. Final simplification44.2%

    \[\leadsto a + y \cdot i \]
  5. Add Preprocessing

Alternative 16: 15.8% accurate, 219.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
def code(x, y, z, t, a, b, c, i):
	return a
function code(x, y, z, t, a, b, c, i)
	return a
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  1. Initial program 99.9%

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

    \[\leadsto \color{blue}{a} + y \cdot i \]
  4. Taylor expanded in a around inf 22.3%

    \[\leadsto \color{blue}{a} \]
  5. Final simplification22.3%

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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