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

Percentage Accurate: 99.8% → 99.8%
Time: 12.7s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\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}
Derivation
  1. Initial program 99.9%

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

Alternative 2: 83.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \left(a + t\right) + \color{blue}{\left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
      2. sum4-defineN/A

        \[\leadsto \mathsf{sum4}\left(a, \color{blue}{t}, z, \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
      3. cancel-sign-subN/A

        \[\leadsto \mathsf{sum4}\left(a, t, z, \left(x \cdot \log y - \left(\mathsf{neg}\left(\log c\right)\right) \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
      4. log-recN/A

        \[\leadsto \mathsf{sum4}\left(a, t, z, \left(x \cdot \log y - \log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{sum4}\left(a, t, z, \left(x \cdot \log y + \left(\mathsf{neg}\left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{sum4}\left(a, t, z, \left(x \cdot \log y + -1 \cdot \left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{sum4}\left(a, t, z, \left(-1 \cdot \left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right) + x \cdot \log y\right)\right) \]
      8. sum4-defineN/A

        \[\leadsto \left(a + t\right) + \color{blue}{\left(z + \left(-1 \cdot \left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right) + x \cdot \log y\right)\right)} \]
      9. associate-+r+N/A

        \[\leadsto \left(a + t\right) + \left(\left(z + -1 \cdot \left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right)\right) + \color{blue}{x \cdot \log y}\right) \]
      10. associate-+r+N/A

        \[\leadsto \left(\left(a + t\right) + \left(z + -1 \cdot \left(\log \left(\frac{1}{c}\right) \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + \color{blue}{x \cdot \log y} \]
    5. Simplified98.4%

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

    if 6.99999999999999993e-50 < 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. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
    4. Step-by-step derivation
      1. Simplified81.7%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        3. log-lowering-log.f6481.7%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      4. Simplified81.7%

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

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

    Alternative 3: 91.0% accurate, 1.8× speedup?

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

      1. Initial program 99.7%

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

        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log y, \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        3. log-lowering-log.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\left(\frac{a}{x}\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        6. associate-+r+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\left(\frac{t}{x} + \frac{z}{x}\right) + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        7. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\log c \cdot \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\log c, \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        11. log-lowering-log.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        12. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        15. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\left(\frac{t}{x}\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        16. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        17. /-lowering-/.f6499.7%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \mathsf{/.f64}\left(z, x\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      5. Simplified99.7%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \color{blue}{\left(\frac{z}{x}\right)}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      7. Step-by-step derivation
        1. /-lowering-/.f6476.4%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{/.f64}\left(z, x\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      8. Simplified76.4%

        \[\leadsto x \cdot \left(\log y + \color{blue}{\frac{z}{x}}\right) + y \cdot i \]
      9. Taylor expanded in x around 0

        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(z + x \cdot \log y\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
      10. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(x \cdot \log y + z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \log y\right), z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \log y\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        4. log-lowering-log.f6476.5%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{log.f64}\left(y\right)\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
      11. Simplified76.5%

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

      if -6.40000000000000026e193 < x < 6.00000000000000037e198

      1. Initial program 99.9%

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

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

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

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

      Alternative 4: 77.3% accurate, 1.8× speedup?

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

        1. Initial program 99.7%

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

          \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log y, \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          3. log-lowering-log.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\left(\frac{a}{x}\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          6. associate-+r+N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\left(\frac{t}{x} + \frac{z}{x}\right) + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          7. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          8. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\log c \cdot \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\log c, \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          11. log-lowering-log.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          12. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          13. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          15. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\left(\frac{t}{x}\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          17. /-lowering-/.f6499.7%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \mathsf{/.f64}\left(z, x\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        5. Simplified99.7%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \color{blue}{\left(\frac{z}{x}\right)}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6476.4%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{/.f64}\left(z, x\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        8. Simplified76.4%

          \[\leadsto x \cdot \left(\log y + \color{blue}{\frac{z}{x}}\right) + y \cdot i \]
        9. Taylor expanded in x around 0

          \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(z + x \cdot \log y\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(x \cdot \log y + z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \log y\right), z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \log y\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          4. log-lowering-log.f6476.5%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{log.f64}\left(y\right)\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        11. Simplified76.5%

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

        if -5.80000000000000026e193 < x < 6.99999999999999962e199

        1. Initial program 99.9%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
        4. Step-by-step derivation
          1. Simplified79.6%

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

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

        Alternative 5: 75.7% accurate, 1.8× speedup?

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

          1. Initial program 99.7%

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

            \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(\log y + \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log y, \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \left(\frac{a}{x} + \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\left(\frac{a}{x}\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{t}{x} + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            6. associate-+r+N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\left(\frac{t}{x} + \frac{z}{x}\right) + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\log c \cdot \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\log c, \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            11. log-lowering-log.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b - \frac{1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            12. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \left(\frac{t}{x} + \frac{z}{x}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            15. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\left(\frac{t}{x}\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \left(\frac{z}{x}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            17. /-lowering-/.f6499.7%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(a, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \frac{-1}{2}\right)\right), x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, x\right), \mathsf{/.f64}\left(z, x\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          5. Simplified99.7%

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \color{blue}{\left(\frac{z}{x}\right)}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          7. Step-by-step derivation
            1. /-lowering-/.f6476.4%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(y\right), \mathsf{/.f64}\left(z, x\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          8. Simplified76.4%

            \[\leadsto x \cdot \left(\log y + \color{blue}{\frac{z}{x}}\right) + y \cdot i \]
          9. Taylor expanded in x around 0

            \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(z + x \cdot \log y\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(x \cdot \log y + z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(x \cdot \log y\right), z\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \log y\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            4. log-lowering-log.f6476.5%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{log.f64}\left(y\right)\right), z\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          11. Simplified76.5%

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

          if -6.40000000000000026e193 < x < 1.54999999999999993e199

          1. Initial program 99.9%

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
          4. Step-by-step derivation
            1. Simplified79.6%

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
              3. log-lowering-log.f6478.1%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            4. Simplified78.1%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+193}:\\ \;\;\;\;\left(x \cdot \log y + z\right) + y \cdot i\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+199}:\\ \;\;\;\;y \cdot i + \left(\left(z + a\right) + b \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \log y + z\right) + y \cdot i\\ \end{array} \]
          7. Add Preprocessing

          Alternative 6: 64.7% accurate, 1.8× speedup?

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

            1. Initial program 99.8%

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
            4. Step-by-step derivation
              1. Simplified80.9%

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

              if -3.3999999999999998e83 < b < 1.05e136

              1. Initial program 99.9%

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
              4. Step-by-step derivation
                1. Simplified65.1%

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

                  \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(a + \left(z + \frac{-1}{2} \cdot \log c\right)\right)}, \mathsf{*.f64}\left(y, i\right)\right) \]
                3. Step-by-step derivation
                  1. associate-+r+N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left(a + z\right) + \frac{-1}{2} \cdot \log c\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(a + z\right), \left(\frac{-1}{2} \cdot \log c\right)\right), \mathsf{*.f64}\left(\color{blue}{y}, i\right)\right) \]
                  3. +-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(z + a\right), \left(\frac{-1}{2} \cdot \log c\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  4. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\frac{-1}{2} \cdot \log c\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  7. log-lowering-log.f6463.3%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \frac{-1}{2}\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                4. Simplified63.3%

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

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

              Alternative 7: 60.2% accurate, 1.9× speedup?

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

                1. Initial program 99.9%

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                4. Step-by-step derivation
                  1. Simplified76.3%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                    3. log-lowering-log.f6476.3%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  4. Simplified76.3%

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

                    \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                  6. Step-by-step derivation
                    1. associate-+r+N/A

                      \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                    4. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                    5. *-lowering-*.f6469.5%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                  7. Simplified69.5%

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

                  if -1.05000000000000002e115 < z

                  1. Initial program 99.9%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified61.6%

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

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

                  Alternative 8: 60.6% accurate, 1.9× speedup?

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

                    1. Initial program 99.9%

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                    4. Step-by-step derivation
                      1. Simplified65.3%

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

                        \[\leadsto \color{blue}{a + \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)} \]
                      3. Step-by-step derivation
                        1. associate-+r+N/A

                          \[\leadsto \left(a + z\right) + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)} \]
                        2. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(\log c \cdot \left(b - \frac{1}{2}\right)\right)}\right) \]
                        3. +-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(z + a\right), \left(\color{blue}{\log c} \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        4. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\color{blue}{\log c} \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, \color{blue}{\left(b - \frac{1}{2}\right)}\right)\right) \]
                        6. log-lowering-log.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(\color{blue}{b} - \frac{1}{2}\right)\right)\right) \]
                        7. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right) \]
                        8. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \left(b + \frac{-1}{2}\right)\right)\right) \]
                        9. +-lowering-+.f6458.7%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), \mathsf{+.f64}\left(b, \color{blue}{\frac{-1}{2}}\right)\right)\right) \]
                      4. Simplified58.7%

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

                      if 3.6e52 < 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. Add Preprocessing
                      3. Taylor expanded in z around inf

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                      4. Step-by-step derivation
                        1. Simplified83.5%

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                          3. log-lowering-log.f6483.5%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                        4. Simplified83.5%

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

                          \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                        6. Step-by-step derivation
                          1. associate-+r+N/A

                            \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                          2. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                          3. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                          4. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                          5. *-lowering-*.f6475.2%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                        7. Simplified75.2%

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

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

                      Alternative 9: 57.9% accurate, 1.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ \mathbf{if}\;b \leq -5 \cdot 10^{+229}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.22 \cdot 10^{+238}:\\ \;\;\;\;y \cdot i + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* b (log c))))
                         (if (<= b -5e+229) t_1 (if (<= b 1.22e+238) (+ (* y i) (+ z a)) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = b * log(c);
                      	double tmp;
                      	if (b <= -5e+229) {
                      		tmp = t_1;
                      	} else if (b <= 1.22e+238) {
                      		tmp = (y * i) + (z + a);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8), intent (in) :: i
                          real(8) :: t_1
                          real(8) :: tmp
                          t_1 = b * log(c)
                          if (b <= (-5d+229)) then
                              tmp = t_1
                          else if (b <= 1.22d+238) then
                              tmp = (y * i) + (z + a)
                          else
                              tmp = t_1
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = b * Math.log(c);
                      	double tmp;
                      	if (b <= -5e+229) {
                      		tmp = t_1;
                      	} else if (b <= 1.22e+238) {
                      		tmp = (y * i) + (z + a);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = b * math.log(c)
                      	tmp = 0
                      	if b <= -5e+229:
                      		tmp = t_1
                      	elif b <= 1.22e+238:
                      		tmp = (y * i) + (z + a)
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(b * log(c))
                      	tmp = 0.0
                      	if (b <= -5e+229)
                      		tmp = t_1;
                      	elseif (b <= 1.22e+238)
                      		tmp = Float64(Float64(y * i) + Float64(z + a));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	t_1 = b * log(c);
                      	tmp = 0.0;
                      	if (b <= -5e+229)
                      		tmp = t_1;
                      	elseif (b <= 1.22e+238)
                      		tmp = (y * i) + (z + a);
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5e+229], t$95$1, If[LessEqual[b, 1.22e+238], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := b \cdot \log c\\
                      \mathbf{if}\;b \leq -5 \cdot 10^{+229}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;b \leq 1.22 \cdot 10^{+238}:\\
                      \;\;\;\;y \cdot i + \left(z + a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if b < -5.0000000000000005e229 or 1.2200000000000001e238 < b

                        1. Initial program 99.7%

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

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

                            \[\leadsto \log c \cdot \color{blue}{b} \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\log c, \color{blue}{b}\right) \]
                          3. log-lowering-log.f6475.9%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right) \]
                        5. Simplified75.9%

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

                        if -5.0000000000000005e229 < b < 1.2200000000000001e238

                        1. Initial program 99.9%

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                        4. Step-by-step derivation
                          1. Simplified69.4%

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                            3. log-lowering-log.f6467.9%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                          4. Simplified67.9%

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

                            \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                          6. Step-by-step derivation
                            1. associate-+r+N/A

                              \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                            2. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                            3. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                            4. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                            5. *-lowering-*.f6459.3%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                          7. Simplified59.3%

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

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

                        Alternative 10: 59.4% accurate, 2.0× speedup?

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

                          1. Initial program 99.9%

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                          4. Step-by-step derivation
                            1. Simplified65.3%

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

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                            3. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                              3. log-lowering-log.f6463.1%

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                            4. Simplified63.1%

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

                              \[\leadsto \color{blue}{a + \left(z + b \cdot \log c\right)} \]
                            6. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(z + b \cdot \log c\right)}\right) \]
                              2. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{+.f64}\left(z, \color{blue}{\left(b \cdot \log c\right)}\right)\right) \]
                              3. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{+.f64}\left(z, \left(\log c \cdot \color{blue}{b}\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(\log c, \color{blue}{b}\right)\right)\right) \]
                              5. log-lowering-log.f6456.8%

                                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{+.f64}\left(z, \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right)\right) \]
                            7. Simplified56.8%

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

                            if 1.45e52 < 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. Add Preprocessing
                            3. Taylor expanded in z around inf

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                            4. Step-by-step derivation
                              1. Simplified83.5%

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                              3. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                3. log-lowering-log.f6483.5%

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                              4. Simplified83.5%

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

                                \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                              6. Step-by-step derivation
                                1. associate-+r+N/A

                                  \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                                2. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                                3. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                                5. *-lowering-*.f6475.2%

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                              7. Simplified75.2%

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

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

                            Alternative 11: 55.3% accurate, 2.0× speedup?

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

                              1. Initial program 99.9%

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                              4. Step-by-step derivation
                                1. Simplified75.4%

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

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                3. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                  2. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                  3. log-lowering-log.f6473.9%

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                4. Simplified73.9%

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

                                  \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                                6. Step-by-step derivation
                                  1. associate-+r+N/A

                                    \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                                  2. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                                  3. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                                  4. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                                  5. *-lowering-*.f6458.2%

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                                7. Simplified58.2%

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

                                if 8.00000000000000058e191 < x

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{x \cdot \log y} \]
                                4. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\log y}\right) \]
                                  2. log-lowering-log.f6455.0%

                                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{log.f64}\left(y\right)\right) \]
                                5. Simplified55.0%

                                  \[\leadsto \color{blue}{x \cdot \log y} \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification57.9%

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

                              Alternative 12: 23.9% accurate, 16.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+152}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-303}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b c i)
                               :precision binary64
                               (if (<= z -2e+152) z (if (<= z -7e-303) (* y i) a)))
                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if (z <= -2e+152) {
                              		tmp = z;
                              	} else if (z <= -7e-303) {
                              		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 (z <= (-2d+152)) then
                                      tmp = z
                                  else if (z <= (-7d-303)) 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 (z <= -2e+152) {
                              		tmp = z;
                              	} else if (z <= -7e-303) {
                              		tmp = y * i;
                              	} else {
                              		tmp = a;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i):
                              	tmp = 0
                              	if z <= -2e+152:
                              		tmp = z
                              	elif z <= -7e-303:
                              		tmp = y * i
                              	else:
                              		tmp = a
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0
                              	if (z <= -2e+152)
                              		tmp = z;
                              	elseif (z <= -7e-303)
                              		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 (z <= -2e+152)
                              		tmp = z;
                              	elseif (z <= -7e-303)
                              		tmp = y * i;
                              	else
                              		tmp = a;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2e+152], z, If[LessEqual[z, -7e-303], N[(y * i), $MachinePrecision], a]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -2 \cdot 10^{+152}:\\
                              \;\;\;\;z\\
                              
                              \mathbf{elif}\;z \leq -7 \cdot 10^{-303}:\\
                              \;\;\;\;y \cdot i\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;a\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if z < -2.0000000000000001e152

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{z} \]
                                4. Step-by-step derivation
                                  1. Simplified61.3%

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

                                  if -2.0000000000000001e152 < z < -7e-303

                                  1. Initial program 99.9%

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

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

                                      \[\leadsto \mathsf{*.f64}\left(i, \color{blue}{y}\right) \]
                                  5. Simplified36.0%

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

                                  if -7e-303 < z

                                  1. Initial program 99.9%

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

                                    \[\leadsto \color{blue}{a} \]
                                  4. Step-by-step derivation
                                    1. Simplified15.7%

                                      \[\leadsto \color{blue}{a} \]
                                  5. Recombined 3 regimes into one program.
                                  6. Final simplification28.6%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+152}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-303}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
                                  7. Add Preprocessing

                                  Alternative 13: 43.2% accurate, 21.9× speedup?

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

                                    1. Initial program 99.9%

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

                                      \[\leadsto \mathsf{+.f64}\left(\color{blue}{z}, \mathsf{*.f64}\left(y, i\right)\right) \]
                                    4. Step-by-step derivation
                                      1. Simplified44.5%

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

                                      if 1.8999999999999998e103 < 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. Add Preprocessing
                                      3. Taylor expanded in a around inf

                                        \[\leadsto \mathsf{+.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(y, i\right)\right) \]
                                      4. Step-by-step derivation
                                        1. Simplified54.7%

                                          \[\leadsto \color{blue}{a} + y \cdot i \]
                                      5. Recombined 2 regimes into one program.
                                      6. Add Preprocessing

                                      Alternative 14: 41.6% accurate, 21.9× speedup?

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

                                        1. Initial program 99.9%

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

                                          \[\leadsto \color{blue}{z} \]
                                        4. Step-by-step derivation
                                          1. Simplified61.3%

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

                                          if -3.8e152 < z

                                          1. Initial program 99.9%

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

                                            \[\leadsto \mathsf{+.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(y, i\right)\right) \]
                                          4. Step-by-step derivation
                                            1. Simplified42.9%

                                              \[\leadsto \color{blue}{a} + y \cdot i \]
                                          5. Recombined 2 regimes into one program.
                                          6. Add Preprocessing

                                          Alternative 15: 52.8% accurate, 31.3× speedup?

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

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

                                            \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{z}, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, \frac{1}{2}\right), \mathsf{log.f64}\left(c\right)\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                          4. Step-by-step derivation
                                            1. Simplified72.7%

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

                                              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \color{blue}{\left(b \cdot \log c\right)}\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                            3. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \left(\log c \cdot b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                              2. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\log c, b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                              3. log-lowering-log.f6471.4%

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(z, a\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(c\right), b\right)\right), \mathsf{*.f64}\left(y, i\right)\right) \]
                                            4. Simplified71.4%

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

                                              \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
                                            6. Step-by-step derivation
                                              1. associate-+r+N/A

                                                \[\leadsto \left(a + z\right) + \color{blue}{i \cdot y} \]
                                              2. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(\left(a + z\right), \color{blue}{\left(i \cdot y\right)}\right) \]
                                              3. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(\color{blue}{i} \cdot y\right)\right) \]
                                              4. *-commutativeN/A

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \left(y \cdot \color{blue}{i}\right)\right) \]
                                              5. *-lowering-*.f6455.5%

                                                \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, z\right), \mathsf{*.f64}\left(y, \color{blue}{i}\right)\right) \]
                                            7. Simplified55.5%

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

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

                                            Alternative 16: 20.8% accurate, 36.4× speedup?

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

                                              1. Initial program 99.9%

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

                                                \[\leadsto \color{blue}{z} \]
                                              4. Step-by-step derivation
                                                1. Simplified18.1%

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

                                                if 8.0000000000000003e108 < 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. Add Preprocessing
                                                3. Taylor expanded in a around inf

                                                  \[\leadsto \color{blue}{a} \]
                                                4. Step-by-step derivation
                                                  1. Simplified41.1%

                                                    \[\leadsto \color{blue}{a} \]
                                                5. Recombined 2 regimes into one program.
                                                6. Add Preprocessing

                                                Alternative 17: 16.5% accurate, 219.0× speedup?

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

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

                                                  \[\leadsto \color{blue}{a} \]
                                                4. Step-by-step derivation
                                                  1. Simplified15.2%

                                                    \[\leadsto \color{blue}{a} \]
                                                  2. Add Preprocessing

                                                  Reproduce

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