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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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) \]
  3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 84.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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) \]
  3. Simplified99.8%

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

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

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

Alternative 4: 94.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+76} \lor \neg \left(x \leq 4 \cdot 10^{+118}\right):\\
\;\;\;\;y \cdot i + \left(\mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2e76 or 3.99999999999999987e118 < 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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e76 < x < 3.99999999999999987e118

    1. Initial program 99.8%

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

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

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

Alternative 5: 88.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+237} \lor \neg \left(x \leq 3.5 \cdot 10^{+243}\right):\\
\;\;\;\;t + \left(z + x \cdot \log y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.49999999999999964e237 or 3.49999999999999988e243 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999964e237 < x < 3.49999999999999988e243

    1. Initial program 99.8%

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

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

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

Alternative 6: 87.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+237} \lor \neg \left(x \leq 2.3 \cdot 10^{+244}\right):\\
\;\;\;\;t + \left(z + x \cdot \log y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.99999999999999976e237 or 2.2999999999999999e244 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999976e237 < x < 2.2999999999999999e244

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 7: 72.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -3.7 \cdot 10^{+169} \lor \neg \left(b - 0.5 \leq 6.6 \cdot 10^{+220}\right):\\
\;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -3.70000000000000001e169 or 6.60000000000000043e220 < (-.f64 b 1/2)

    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. Taylor expanded in a around inf 84.2%

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

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

    if -3.70000000000000001e169 < (-.f64 b 1/2) < 6.60000000000000043e220

    1. Initial program 99.9%

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

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

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

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

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

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

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

Alternative 8: 73.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;b - 0.5 \leq -5.1 \cdot 10^{+185}:\\
\;\;\;\;t + \left(z + t_1\right)\\

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.09999999999999996e185 < (-.f64 b 1/2) < 6.99999999999999984e216

    1. Initial program 99.9%

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

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

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

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

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

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

    if 6.99999999999999984e216 < (-.f64 b 1/2)

    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. Taylor expanded in a around inf 90.0%

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

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

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

Alternative 9: 74.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.75 \cdot 10^{-11} \lor \neg \left(i \leq 155\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -2.74999999999999987e-11 or 155 < i

    1. Initial program 99.9%

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

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

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

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

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

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

    if -2.74999999999999987e-11 < i < 155

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

Alternative 10: 59.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -6.00000000000000029e148 < z

    1. Initial program 99.8%

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

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

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

Alternative 11: 58.4% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -6.19999999999999951e148 < z

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 12: 70.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+238} \lor \neg \left(x \leq 3.1 \cdot 10^{+266}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.85e238 or 3.1e266 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85e238 < x < 3.1e266

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+238} \lor \neg \left(x \leq 3.1 \cdot 10^{+266}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\ \end{array} \]

Alternative 13: 25.9% accurate, 23.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{-291}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-106}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 9.7 \cdot 10^{+197}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 2.24999999999999987e-291 or 1.95000000000000005e-106 < a < 9.69999999999999936e197

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    6. Simplified31.1%

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

    if 2.24999999999999987e-291 < a < 1.95000000000000005e-106

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 9.69999999999999936e197 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.25 \cdot 10^{-291}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-106}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 9.7 \cdot 10^{+197}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 14: 59.0% accurate, 24.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.6999999999999999e-9

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    7. Taylor expanded in y around 0 49.1%

      \[\leadsto \color{blue}{a + \left(t + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative49.1%

        \[\leadsto \color{blue}{\left(t + z\right) + a} \]
      2. associate-+l+49.1%

        \[\leadsto \color{blue}{t + \left(z + a\right)} \]
    9. Simplified49.1%

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

    if 4.6999999999999999e-9 < y

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    7. Taylor expanded in z around 0 61.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.7 \cdot 10^{-9}:\\ \;\;\;\;t + \left(a + z\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(y \cdot i + t\right)\\ \end{array} \]

Alternative 15: 57.5% accurate, 24.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.8 \cdot 10^{+143}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    7. Taylor expanded in a around 0 55.6%

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

        \[\leadsto \color{blue}{\left(t + z\right) + i \cdot y} \]
    9. Simplified55.6%

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

    if 3.8e143 < a

    1. Initial program 99.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    7. Taylor expanded in z around 0 79.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.8 \cdot 10^{+143}:\\ \;\;\;\;y \cdot i + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(y \cdot i + t\right)\\ \end{array} \]

Alternative 16: 66.7% accurate, 24.3× speedup?

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

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

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

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

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

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

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

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

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

Alternative 17: 52.4% accurate, 31.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{+148}:\\
\;\;\;\;t + \left(a + z\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    7. Taylor expanded in y around 0 47.9%

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

        \[\leadsto \color{blue}{\left(t + z\right) + a} \]
      2. associate-+l+47.9%

        \[\leadsto \color{blue}{t + \left(z + a\right)} \]
    9. Simplified47.9%

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

    if 1.80000000000000003e148 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{+148}:\\ \;\;\;\;t + \left(a + z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]

Alternative 18: 21.1% accurate, 71.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.85 \cdot 10^{+143}:\\
\;\;\;\;z\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.85000000000000011e143 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 16.1% 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.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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) \]
  3. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  7. Final simplification12.6%

    \[\leadsto a \]

Reproduce

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