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

Percentage Accurate: 99.8% → 99.8%
Time: 11.8s
Alternatives: 12
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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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 12 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot i} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
    4. lower-fma.f6499.8

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    10. lift-+.f64N/A

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
    12. lower-+.f6499.9

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
    13. lift-+.f64N/A

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
    15. lower-+.f6499.9

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
    16. lift-+.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \left(t + \left(\color{blue}{\log y \cdot x} + z\right)\right)\right)\right) \]
    19. lower-fma.f6499.9

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

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

Alternative 2: 91.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+106} \lor \neg \left(x \leq 1.22 \cdot 10^{+97}\right):\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, z\right)\right)\right) + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.50000000000000058e106 or 1.21999999999999997e97 < 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 t around 0

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

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

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

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

      \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\frac{-1}{2}, \log c, z\right)\right)\right) + a \]
    7. Step-by-step derivation
      1. Applied rewrites82.2%

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

      if -7.50000000000000058e106 < x < 1.21999999999999997e97

      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 \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      4. Step-by-step derivation
        1. associate-+r+N/A

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

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

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

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

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

          \[\leadsto \left(a + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + \left(z + i \cdot y\right)\right) \]
        7. lower-fma.f64N/A

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

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

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

          \[\leadsto \left(a + t\right) + \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{i \cdot y + z}\right) \]
        11. lower-fma.f6499.9

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

        \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification93.6%

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

    Alternative 3: 89.7% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+132} \lor \neg \left(x \leq 9.6 \cdot 10^{+94}\right):\\ \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, z + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (or (<= x -5.4e+132) (not (<= x 9.6e+94)))
       (fma (- b 0.5) (log c) (fma (log y) x (+ z a)))
       (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if ((x <= -5.4e+132) || !(x <= 9.6e+94)) {
    		tmp = fma((b - 0.5), log(c), fma(log(y), x, (z + a)));
    	} else {
    		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if ((x <= -5.4e+132) || !(x <= 9.6e+94))
    		tmp = fma(Float64(b - 0.5), log(c), fma(log(y), x, Float64(z + a)));
    	else
    		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.4e+132], N[Not[LessEqual[x, 9.6e+94]], $MachinePrecision]], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -5.4 \cdot 10^{+132} \lor \neg \left(x \leq 9.6 \cdot 10^{+94}\right):\\
    \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, z + a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -5.3999999999999999e132 or 9.5999999999999993e94 < 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 t around 0

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

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

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

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

        \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
      7. Step-by-step derivation
        1. Applied rewrites59.0%

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

          \[\leadsto a + \color{blue}{\left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
        3. Step-by-step derivation
          1. Applied rewrites76.0%

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

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

            if -5.3999999999999999e132 < x < 9.5999999999999993e94

            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 \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

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

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

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

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

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

                \[\leadsto \left(a + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + \left(z + i \cdot y\right)\right) \]
              7. lower-fma.f64N/A

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

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

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

                \[\leadsto \left(a + t\right) + \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{i \cdot y + z}\right) \]
              11. lower-fma.f6498.3

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

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

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

          Alternative 4: 85.0% accurate, 1.0× speedup?

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

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

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

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

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

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

          Alternative 5: 89.8% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+174}:\\ \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(-0.5, \log c, x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+210}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x + y \cdot i\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (if (<= x -5.5e+174)
             (+ (+ a z) (fma -0.5 (log c) (* x (log y))))
             (if (<= x 1.1e+210)
               (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))
               (+ (* (log y) x) (* y i)))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double tmp;
          	if (x <= -5.5e+174) {
          		tmp = (a + z) + fma(-0.5, log(c), (x * log(y)));
          	} else if (x <= 1.1e+210) {
          		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
          	} else {
          		tmp = (log(y) * x) + (y * i);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	tmp = 0.0
          	if (x <= -5.5e+174)
          		tmp = Float64(Float64(a + z) + fma(-0.5, log(c), Float64(x * log(y))));
          	elseif (x <= 1.1e+210)
          		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
          	else
          		tmp = Float64(Float64(log(y) * x) + Float64(y * i));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -5.5e+174], N[(N[(a + z), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+210], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -5.5 \cdot 10^{+174}:\\
          \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(-0.5, \log c, x \cdot \log y\right)\\
          
          \mathbf{elif}\;x \leq 1.1 \cdot 10^{+210}:\\
          \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\log y \cdot x + y \cdot i\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if x < -5.4999999999999998e174

            1. Initial program 99.5%

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

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

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

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

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

              \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
            7. Step-by-step derivation
              1. Applied rewrites51.6%

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

                \[\leadsto a + \color{blue}{\left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites81.9%

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

                  \[\leadsto \left(a + z\right) + \mathsf{fma}\left(\frac{-1}{2}, \log c, x \cdot \log y\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites75.8%

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

                  if -5.4999999999999998e174 < x < 1.09999999999999993e210

                  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 \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                  4. Step-by-step derivation
                    1. associate-+r+N/A

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

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

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

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

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

                      \[\leadsto \left(a + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + \left(z + i \cdot y\right)\right) \]
                    7. lower-fma.f64N/A

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

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

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

                      \[\leadsto \left(a + t\right) + \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{i \cdot y + z}\right) \]
                    11. lower-fma.f6494.1

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

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

                  if 1.09999999999999993e210 < 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. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{x \cdot \left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right)} + y \cdot i \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \color{blue}{\left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right) \cdot x} + y \cdot i \]
                  7. Applied rewrites99.8%

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

                    \[\leadsto \log y \cdot x + y \cdot i \]
                  9. Step-by-step derivation
                    1. Applied rewrites83.9%

                      \[\leadsto \log y \cdot x + y \cdot i \]
                  10. Recombined 3 regimes into one program.
                  11. Add Preprocessing

                  Alternative 6: 90.5% accurate, 1.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (or (<= x -1.7e+207) (not (<= x 1.1e+210)))
                     (+ (* (log y) x) (* y i))
                     (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((x <= -1.7e+207) || !(x <= 1.1e+210)) {
                  		tmp = (log(y) * x) + (y * i);
                  	} else {
                  		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if ((x <= -1.7e+207) || !(x <= 1.1e+210))
                  		tmp = Float64(Float64(log(y) * x) + Float64(y * i));
                  	else
                  		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.7e+207], N[Not[LessEqual[x, 1.1e+210]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\
                  \;\;\;\;\log y \cdot x + y \cdot i\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -1.6999999999999999e207 or 1.09999999999999993e210 < x

                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x \cdot \left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right)} + y \cdot i \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \color{blue}{\left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right) \cdot x} + y \cdot i \]
                    7. Applied rewrites99.6%

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

                      \[\leadsto \log y \cdot x + y \cdot i \]
                    9. Step-by-step derivation
                      1. Applied rewrites83.0%

                        \[\leadsto \log y \cdot x + y \cdot i \]

                      if -1.6999999999999999e207 < x < 1.09999999999999993e210

                      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 \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. associate-+r+N/A

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

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

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

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

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

                          \[\leadsto \left(a + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + \left(z + i \cdot y\right)\right) \]
                        7. lower-fma.f64N/A

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

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

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

                          \[\leadsto \left(a + t\right) + \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{i \cdot y + z}\right) \]
                        11. lower-fma.f6493.4

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

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

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

                    Alternative 7: 76.6% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, z\right) + a\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (if (or (<= x -1.7e+207) (not (<= x 1.1e+210)))
                       (+ (* (log y) x) (* y i))
                       (fma y i (+ (fma (- b 0.5) (log c) z) a))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if ((x <= -1.7e+207) || !(x <= 1.1e+210)) {
                    		tmp = (log(y) * x) + (y * i);
                    	} else {
                    		tmp = fma(y, i, (fma((b - 0.5), log(c), z) + a));
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	tmp = 0.0
                    	if ((x <= -1.7e+207) || !(x <= 1.1e+210))
                    		tmp = Float64(Float64(log(y) * x) + Float64(y * i));
                    	else
                    		tmp = fma(y, i, Float64(fma(Float64(b - 0.5), log(c), z) + a));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.7e+207], N[Not[LessEqual[x, 1.1e+210]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\
                    \;\;\;\;\log y \cdot x + y \cdot i\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, z\right) + a\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -1.6999999999999999e207 or 1.09999999999999993e210 < x

                      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{x \cdot \left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right)} + y \cdot i \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right) \cdot x} + y \cdot i \]
                      7. Applied rewrites99.6%

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

                        \[\leadsto \log y \cdot x + y \cdot i \]
                      9. Step-by-step derivation
                        1. Applied rewrites83.0%

                          \[\leadsto \log y \cdot x + y \cdot i \]

                        if -1.6999999999999999e207 < x < 1.09999999999999993e210

                        1. Initial program 99.9%

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

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

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

                            \[\leadsto \color{blue}{y \cdot i} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                          4. lower-fma.f6499.9

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                          10. lift-+.f64N/A

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

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                          12. lower-+.f6499.9

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                          13. lift-+.f64N/A

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

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                          15. lower-+.f6499.9

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                          16. lift-+.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \left(t + \left(\color{blue}{\log y \cdot x} + z\right)\right)\right)\right) \]
                          19. lower-fma.f6499.9

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \left(\color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right)} + t\right) + a\right) \]
                          7. lower-log.f64N/A

                            \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                          8. lower--.f6493.4

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

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

                          \[\leadsto \mathsf{fma}\left(y, i, a + \color{blue}{\left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right) \]
                        9. Step-by-step derivation
                          1. Applied rewrites75.1%

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, z\right) + \color{blue}{a}\right) \]
                        10. Recombined 2 regimes into one program.
                        11. Final simplification76.4%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, z\right) + a\right)\\ \end{array} \]
                        12. Add Preprocessing

                        Alternative 8: 76.6% accurate, 1.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (if (or (<= x -1.7e+207) (not (<= x 1.1e+210)))
                           (+ (* (log y) x) (* y i))
                           (+ (fma i y (fma (log c) (- b 0.5) z)) a)))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double tmp;
                        	if ((x <= -1.7e+207) || !(x <= 1.1e+210)) {
                        		tmp = (log(y) * x) + (y * i);
                        	} else {
                        		tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i)
                        	tmp = 0.0
                        	if ((x <= -1.7e+207) || !(x <= 1.1e+210))
                        		tmp = Float64(Float64(log(y) * x) + Float64(y * i));
                        	else
                        		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a);
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.7e+207], N[Not[LessEqual[x, 1.1e+210]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq -1.7 \cdot 10^{+207} \lor \neg \left(x \leq 1.1 \cdot 10^{+210}\right):\\
                        \;\;\;\;\log y \cdot x + y \cdot i\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < -1.6999999999999999e207 or 1.09999999999999993e210 < x

                          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{x \cdot \left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right)} + y \cdot i \]
                          6. Step-by-step derivation
                            1. *-commutativeN/A

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

                              \[\leadsto \color{blue}{\left(\left(\log y + \left(\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x} + \frac{{t}^{2}}{x \cdot \left(t - a\right)}\right)\right) - \left(-1 \cdot \frac{z}{x} + \frac{{a}^{2}}{x \cdot \left(t - a\right)}\right)\right) \cdot x} + y \cdot i \]
                          7. Applied rewrites99.6%

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

                            \[\leadsto \log y \cdot x + y \cdot i \]
                          9. Step-by-step derivation
                            1. Applied rewrites83.0%

                              \[\leadsto \log y \cdot x + y \cdot i \]

                            if -1.6999999999999999e207 < x < 1.09999999999999993e210

                            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 t around 0

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(i, y, z + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a \]
                            7. Step-by-step derivation
                              1. Applied rewrites75.1%

                                \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification76.4%

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

                            Alternative 9: 60.2% accurate, 1.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -7.5 \cdot 10^{-26} \lor \neg \left(i \leq 1.06 \cdot 10^{+155}\right):\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (if (or (<= i -7.5e-26) (not (<= i 1.06e+155)))
                               (+ (* (+ (/ z i) y) i) a)
                               (+ (fma (log c) (- b 0.5) z) a)))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double tmp;
                            	if ((i <= -7.5e-26) || !(i <= 1.06e+155)) {
                            		tmp = (((z / i) + y) * i) + a;
                            	} else {
                            		tmp = fma(log(c), (b - 0.5), z) + a;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0
                            	if ((i <= -7.5e-26) || !(i <= 1.06e+155))
                            		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                            	else
                            		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -7.5e-26], N[Not[LessEqual[i, 1.06e+155]], $MachinePrecision]], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;i \leq -7.5 \cdot 10^{-26} \lor \neg \left(i \leq 1.06 \cdot 10^{+155}\right):\\
                            \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if i < -7.4999999999999994e-26 or 1.06000000000000005e155 < i

                              1. Initial program 99.9%

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

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

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

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

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

                                \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
                              7. Step-by-step derivation
                                1. Applied rewrites87.3%

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

                                  \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                3. Step-by-step derivation
                                  1. Applied rewrites66.6%

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

                                  if -7.4999999999999994e-26 < i < 1.06000000000000005e155

                                  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 t around 0

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

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

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

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

                                    \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites39.7%

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

                                      \[\leadsto a + \color{blue}{\left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites76.3%

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

                                        \[\leadsto a + \left(z + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites53.2%

                                          \[\leadsto \mathsf{fma}\left(\log c, b - 0.5, z\right) + a \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification58.6%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -7.5 \cdot 10^{-26} \lor \neg \left(i \leq 1.06 \cdot 10^{+155}\right):\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 10: 51.7% accurate, 2.0× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{+174} \lor \neg \left(x \leq 1.05 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b c i)
                                       :precision binary64
                                       (if (or (<= x -6.2e+174) (not (<= x 1.05e+210)))
                                         (* (log y) x)
                                         (+ (* (+ (/ z i) y) i) a)))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double tmp;
                                      	if ((x <= -6.2e+174) || !(x <= 1.05e+210)) {
                                      		tmp = log(y) * x;
                                      	} else {
                                      		tmp = (((z / i) + y) * i) + a;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(x, y, z, t, a, b, c, i)
                                      use fmin_fmax_functions
                                          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 <= (-6.2d+174)) .or. (.not. (x <= 1.05d+210))) then
                                              tmp = log(y) * x
                                          else
                                              tmp = (((z / i) + y) * i) + a
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double tmp;
                                      	if ((x <= -6.2e+174) || !(x <= 1.05e+210)) {
                                      		tmp = Math.log(y) * x;
                                      	} else {
                                      		tmp = (((z / i) + y) * i) + a;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a, b, c, i):
                                      	tmp = 0
                                      	if (x <= -6.2e+174) or not (x <= 1.05e+210):
                                      		tmp = math.log(y) * x
                                      	else:
                                      		tmp = (((z / i) + y) * i) + a
                                      	return tmp
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	tmp = 0.0
                                      	if ((x <= -6.2e+174) || !(x <= 1.05e+210))
                                      		tmp = Float64(log(y) * x);
                                      	else
                                      		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                                      	tmp = 0.0;
                                      	if ((x <= -6.2e+174) || ~((x <= 1.05e+210)))
                                      		tmp = log(y) * x;
                                      	else
                                      		tmp = (((z / i) + y) * i) + a;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.2e+174], N[Not[LessEqual[x, 1.05e+210]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;x \leq -6.2 \cdot 10^{+174} \lor \neg \left(x \leq 1.05 \cdot 10^{+210}\right):\\
                                      \;\;\;\;\log y \cdot x\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if x < -6.2e174 or 1.0499999999999999e210 < x

                                        1. Initial program 99.6%

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

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

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

                                            \[\leadsto \color{blue}{y \cdot i} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                          4. lower-fma.f6499.6

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)} + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right) \]
                                          9. lower-fma.f6499.6

                                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                          10. lift-+.f64N/A

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                          12. lower-+.f6499.6

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                          13. lift-+.f64N/A

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                          15. lower-+.f6499.6

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                          16. lift-+.f64N/A

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, a + \left(t + \left(\color{blue}{\log y \cdot x} + z\right)\right)\right)\right) \]
                                          19. lower-fma.f6499.6

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

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

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

                                            \[\leadsto \color{blue}{\log y \cdot x} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\log y \cdot x} \]
                                          3. lower-log.f6464.4

                                            \[\leadsto \color{blue}{\log y} \cdot x \]
                                        7. Applied rewrites64.4%

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

                                        if -6.2e174 < x < 1.0499999999999999e210

                                        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 t around 0

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

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

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

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

                                          \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites61.4%

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

                                            \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites50.0%

                                              \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                          4. Recombined 2 regimes into one program.
                                          5. Final simplification52.8%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{+174} \lor \neg \left(x \leq 1.05 \cdot 10^{+210}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \]
                                          6. Add Preprocessing

                                          Alternative 11: 46.6% accurate, 10.2× speedup?

                                          \[\begin{array}{l} \\ \left(\frac{z}{i} + y\right) \cdot i + a \end{array} \]
                                          (FPCore (x y z t a b c i) :precision binary64 (+ (* (+ (/ z i) y) i) a))
                                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                          	return (((z / i) + y) * i) + a;
                                          }
                                          
                                          module fmin_fmax_functions
                                              implicit none
                                              private
                                              public fmax
                                              public fmin
                                          
                                              interface fmax
                                                  module procedure fmax88
                                                  module procedure fmax44
                                                  module procedure fmax84
                                                  module procedure fmax48
                                              end interface
                                              interface fmin
                                                  module procedure fmin88
                                                  module procedure fmin44
                                                  module procedure fmin84
                                                  module procedure fmin48
                                              end interface
                                          contains
                                              real(8) function fmax88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmax44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmax84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmax48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmin44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmin48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                              end function
                                          end module
                                          
                                          real(8) function code(x, y, z, t, a, b, c, i)
                                          use fmin_fmax_functions
                                              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 = (((z / i) + y) * i) + a
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                          	return (((z / i) + y) * i) + a;
                                          }
                                          
                                          def code(x, y, z, t, a, b, c, i):
                                          	return (((z / i) + y) * i) + a
                                          
                                          function code(x, y, z, t, a, b, c, i)
                                          	return Float64(Float64(Float64(Float64(z / i) + y) * i) + a)
                                          end
                                          
                                          function tmp = code(x, y, z, t, a, b, c, i)
                                          	tmp = (((z / i) + y) * i) + a;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \left(\frac{z}{i} + y\right) \cdot i + a
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 99.8%

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

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

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

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

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

                                            \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites59.0%

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

                                              \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites44.0%

                                                \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                              2. Add Preprocessing

                                              Alternative 12: 24.0% accurate, 39.0× speedup?

                                              \[\begin{array}{l} \\ i \cdot y \end{array} \]
                                              (FPCore (x y z t a b c i) :precision binary64 (* i y))
                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                              	return i * y;
                                              }
                                              
                                              module fmin_fmax_functions
                                                  implicit none
                                                  private
                                                  public fmax
                                                  public fmin
                                              
                                                  interface fmax
                                                      module procedure fmax88
                                                      module procedure fmax44
                                                      module procedure fmax84
                                                      module procedure fmax48
                                                  end interface
                                                  interface fmin
                                                      module procedure fmin88
                                                      module procedure fmin44
                                                      module procedure fmin84
                                                      module procedure fmin48
                                                  end interface
                                              contains
                                                  real(8) function fmax88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmax44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmin44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                  end function
                                              end module
                                              
                                              real(8) function code(x, y, z, t, a, b, c, i)
                                              use fmin_fmax_functions
                                                  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 = i * y
                                              end function
                                              
                                              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                              	return i * y;
                                              }
                                              
                                              def code(x, y, z, t, a, b, c, i):
                                              	return i * y
                                              
                                              function code(x, y, z, t, a, b, c, i)
                                              	return Float64(i * y)
                                              end
                                              
                                              function tmp = code(x, y, z, t, a, b, c, i)
                                              	tmp = i * y;
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              i \cdot y
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 99.8%

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

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

                                                  \[\leadsto \color{blue}{i \cdot y} \]
                                              5. Applied rewrites23.5%

                                                \[\leadsto \color{blue}{i \cdot y} \]
                                              6. Add Preprocessing

                                              Reproduce

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