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

Percentage Accurate: 99.8% → 99.8%
Time: 6.6s
Alternatives: 23
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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} \\ \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}
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

Alternative 2: 93.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\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 \leq 500:\\
\;\;\;\;\left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right) + z\right) + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 500

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \log y \cdot x\right)\right) + z\right) + t \]
      12. lift-log.f6484.4

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

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

    if 500 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{fma}\left(\log y, x, t\right) + a\right) + \color{blue}{b} \cdot \log c\right) + y \cdot i \]
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 3: 92.7% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x + a\right)\right)\\ \mathbf{if}\;x \leq -7.5 \cdot 10^{+143}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.9 \cdot 10^{+120}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (fma y i (fma (log c) (- b 0.5) (+ (* (log y) x) a)))))
       (if (<= x -7.5e+143)
         t_1
         (if (<= x 4.9e+120)
           (+ (+ (+ (fma (log c) (- b 0.5) (* i y)) z) t) a)
           t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = fma(y, i, fma(log(c), (b - 0.5), ((log(y) * x) + a)));
    	double tmp;
    	if (x <= -7.5e+143) {
    		tmp = t_1;
    	} else if (x <= 4.9e+120) {
    		tmp = ((fma(log(c), (b - 0.5), (i * y)) + z) + t) + a;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = fma(y, i, fma(log(c), Float64(b - 0.5), Float64(Float64(log(y) * x) + a)))
    	tmp = 0.0
    	if (x <= -7.5e+143)
    		tmp = t_1;
    	elseif (x <= 4.9e+120)
    		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(i * y)) + z) + t) + a);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+143], t$95$1, If[LessEqual[x, 4.9e+120], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x + a\right)\right)\\
    \mathbf{if}\;x \leq -7.5 \cdot 10^{+143}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 4.9 \cdot 10^{+120}:\\
    \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -7.49999999999999974e143 or 4.9000000000000001e120 < 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. Taylor expanded in z around 0

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

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

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

          \[\leadsto \left(\left(\mathsf{fma}\left(\log y, \color{blue}{x}, t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
        4. lift-log.f6489.5

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

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

          \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
        4. lower-fma.f6489.5

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, \mathsf{fma}\left(\log y, x, t\right) + a\right)\right) \]
        13. lift--.f6489.5

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \log y \cdot x + a\right)\right) \]
        3. lift-*.f6481.7

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

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

      if -7.49999999999999974e143 < x < 4.9000000000000001e120

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 90.8% accurate, 0.9× speedup?

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

      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. Taylor expanded in z around 0

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

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

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

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

          \[\leadsto \left(\left(\mathsf{fma}\left(\log y, x, t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      4. Applied rewrites90.2%

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

          \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
        4. lower-fma.f6490.2

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, \mathsf{fma}\left(\log y, x, t\right) + a\right)\right) \]
        13. lift--.f6490.3

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \log y \cdot x + a\right)\right) \]
        3. lift-*.f6482.7

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

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

      if -7.49999999999999974e143 < x < 3.29999999999999991e120

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.29999999999999991e120 < 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. Taylor expanded in z around 0

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, 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(\mathsf{fma}\left(\log y, x, t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
        4. lower-fma.f6488.9

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right) + a\right)\right)} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 5: 90.4% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;x \leq -2.2 \cdot 10^{+146}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+190}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (+ (+ (* (log y) x) (* b (log c))) (* y i))))
       (if (<= x -2.2e+146)
         t_1
         (if (<= x 1.3e+190)
           (+ (+ (+ (fma (log c) (- b 0.5) (* i y)) z) t) a)
           t_1))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = ((log(y) * x) + (b * log(c))) + (y * i);
    	double tmp;
    	if (x <= -2.2e+146) {
    		tmp = t_1;
    	} else if (x <= 1.3e+190) {
    		tmp = ((fma(log(c), (b - 0.5), (i * y)) + z) + t) + a;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(Float64(Float64(log(y) * x) + Float64(b * log(c))) + Float64(y * i))
    	tmp = 0.0
    	if (x <= -2.2e+146)
    		tmp = t_1;
    	elseif (x <= 1.3e+190)
    		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(i * y)) + z) + t) + a);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+146], t$95$1, If[LessEqual[x, 1.3e+190], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i\\
    \mathbf{if}\;x \leq -2.2 \cdot 10^{+146}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 1.3 \cdot 10^{+190}:\\
    \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -2.1999999999999998e146 or 1.30000000000000005e190 < 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. Taylor expanded in t around inf

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

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

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

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

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

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

              \[\leadsto \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i \]
            3. lift-*.f6475.5

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

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

          if -2.1999999999999998e146 < x < 1.30000000000000005e190

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a} \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 6: 84.0% accurate, 1.1× speedup?

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

          1. Initial program 99.5%

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

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

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

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

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

            \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
            2. lift-log.f64N/A

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
            3. lift-*.f6473.2

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
          7. Applied rewrites73.2%

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

          if -1.8499999999999999e185 < x < 7.4999999999999994e190

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.4999999999999994e190 < 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. Taylor expanded in x around inf

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

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

              \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
            3. lift-log.f6472.6

              \[\leadsto \log y \cdot x + y \cdot i \]
          4. Applied rewrites72.6%

            \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 7: 76.5% accurate, 1.2× speedup?

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

          1. Initial program 99.5%

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

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

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

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

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

            \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
            2. lift-log.f64N/A

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
            3. lift-*.f6473.1

              \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
          7. Applied rewrites73.1%

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

          if -1.08e185 < x < 7.4999999999999994e190

          1. Initial program 99.9%

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

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

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

            if 7.4999999999999994e190 < 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. Taylor expanded in x around inf

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

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

                \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
              3. lift-log.f6472.6

                \[\leadsto \log y \cdot x + y \cdot i \]
            4. Applied rewrites72.6%

              \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 8: 69.4% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 500:\\ \;\;\;\;\left(z + t\_1\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t + a\right) + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (* (- b 0.5) (log c))))
             (if (<= (+ (+ (+ (+ (+ (* x (log y)) z) t) a) t_1) (* y i)) 500.0)
               (+ (+ z t_1) (* y i))
               (+ (+ (+ t a) (* b (log c))) (* y i)))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (b - 0.5) * log(c);
          	double tmp;
          	if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0) {
          		tmp = (z + t_1) + (y * i);
          	} else {
          		tmp = ((t + a) + (b * log(c))) + (y * i);
          	}
          	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) :: t_1
              real(8) :: tmp
              t_1 = (b - 0.5d0) * log(c)
              if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0d0) then
                  tmp = (z + t_1) + (y * i)
              else
                  tmp = ((t + a) + (b * log(c))) + (y * i)
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (b - 0.5) * Math.log(c);
          	double tmp;
          	if (((((((x * Math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0) {
          		tmp = (z + t_1) + (y * i);
          	} else {
          		tmp = ((t + a) + (b * Math.log(c))) + (y * i);
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b, c, i):
          	t_1 = (b - 0.5) * math.log(c)
          	tmp = 0
          	if ((((((x * math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0:
          		tmp = (z + t_1) + (y * i)
          	else:
          		tmp = ((t + a) + (b * math.log(c))) + (y * i)
          	return tmp
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(b - 0.5) * log(c))
          	tmp = 0.0
          	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + t_1) + Float64(y * i)) <= 500.0)
          		tmp = Float64(Float64(z + t_1) + Float64(y * i));
          	else
          		tmp = Float64(Float64(Float64(t + a) + Float64(b * log(c))) + Float64(y * i));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b, c, i)
          	t_1 = (b - 0.5) * log(c);
          	tmp = 0.0;
          	if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0)
          		tmp = (z + t_1) + (y * i);
          	else
          		tmp = ((t + a) + (b * log(c))) + (y * i);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], 500.0], N[(N[(z + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(b - 0.5\right) \cdot \log c\\
          \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 500:\\
          \;\;\;\;\left(z + t\_1\right) + y \cdot i\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left(t + a\right) + b \cdot \log c\right) + y \cdot i\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 500

            1. Initial program 99.9%

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

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

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

              if 500 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

              1. Initial program 99.8%

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

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

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

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

                    \[\leadsto \left(\left(t + a\right) + \color{blue}{b} \cdot \log c\right) + y \cdot i \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 9: 66.3% accurate, 0.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 500:\\ \;\;\;\;\left(z + t\_1\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(a + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (* (- b 0.5) (log c))))
                   (if (<= (+ (+ (+ (+ (+ (* x (log y)) z) t) a) t_1) (* y i)) 500.0)
                     (+ (+ z t_1) (* y i))
                     (+ (+ a (* b (log c))) (* y i)))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (b - 0.5) * log(c);
                	double tmp;
                	if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0) {
                		tmp = (z + t_1) + (y * i);
                	} else {
                		tmp = (a + (b * log(c))) + (y * i);
                	}
                	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) :: t_1
                    real(8) :: tmp
                    t_1 = (b - 0.5d0) * log(c)
                    if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0d0) then
                        tmp = (z + t_1) + (y * i)
                    else
                        tmp = (a + (b * log(c))) + (y * i)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (b - 0.5) * Math.log(c);
                	double tmp;
                	if (((((((x * Math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0) {
                		tmp = (z + t_1) + (y * i);
                	} else {
                		tmp = (a + (b * Math.log(c))) + (y * i);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = (b - 0.5) * math.log(c)
                	tmp = 0
                	if ((((((x * math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0:
                		tmp = (z + t_1) + (y * i)
                	else:
                		tmp = (a + (b * math.log(c))) + (y * i)
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(Float64(b - 0.5) * log(c))
                	tmp = 0.0
                	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + t_1) + Float64(y * i)) <= 500.0)
                		tmp = Float64(Float64(z + t_1) + Float64(y * i));
                	else
                		tmp = Float64(Float64(a + Float64(b * log(c))) + Float64(y * i));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = (b - 0.5) * log(c);
                	tmp = 0.0;
                	if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 500.0)
                		tmp = (z + t_1) + (y * i);
                	else
                		tmp = (a + (b * log(c))) + (y * i);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], 500.0], N[(N[(z + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(b - 0.5\right) \cdot \log c\\
                \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 500:\\
                \;\;\;\;\left(z + t\_1\right) + y \cdot i\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(a + b \cdot \log c\right) + y \cdot i\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 500

                  1. Initial program 99.9%

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

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

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

                    if 500 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                        Alternative 10: 61.8% accurate, 0.6× speedup?

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

                          1. Initial program 99.9%

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

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

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

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

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

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

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

                                if -2e21 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                1. Initial program 99.8%

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

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

                                    \[\leadsto \left(\color{blue}{a} + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                4. Recombined 2 regimes into one program.
                                5. Add Preprocessing

                                Alternative 11: 54.6% accurate, 0.6× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ \mathbf{if}\;\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 \leq -80:\\ \;\;\;\;\left(z + t\_1\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\_1\right) + y \cdot i\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (let* ((t_1 (* b (log c))))
                                   (if (<=
                                        (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
                                        -80.0)
                                     (+ (+ z t_1) (* y i))
                                     (+ (+ a t_1) (* y i)))))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double t_1 = b * log(c);
                                	double tmp;
                                	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -80.0) {
                                		tmp = (z + t_1) + (y * i);
                                	} else {
                                		tmp = (a + t_1) + (y * i);
                                	}
                                	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) :: t_1
                                    real(8) :: tmp
                                    t_1 = b * log(c)
                                    if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-80.0d0)) then
                                        tmp = (z + t_1) + (y * i)
                                    else
                                        tmp = (a + t_1) + (y * i)
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double t_1 = b * Math.log(c);
                                	double tmp;
                                	if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -80.0) {
                                		tmp = (z + t_1) + (y * i);
                                	} else {
                                		tmp = (a + t_1) + (y * i);
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a, b, c, i):
                                	t_1 = b * math.log(c)
                                	tmp = 0
                                	if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -80.0:
                                		tmp = (z + t_1) + (y * i)
                                	else:
                                		tmp = (a + t_1) + (y * i)
                                	return tmp
                                
                                function code(x, y, z, t, a, b, c, i)
                                	t_1 = Float64(b * log(c))
                                	tmp = 0.0
                                	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -80.0)
                                		tmp = Float64(Float64(z + t_1) + Float64(y * i));
                                	else
                                		tmp = Float64(Float64(a + t_1) + Float64(y * i));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a, b, c, i)
                                	t_1 = b * log(c);
                                	tmp = 0.0;
                                	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -80.0)
                                		tmp = (z + t_1) + (y * i);
                                	else
                                		tmp = (a + t_1) + (y * i);
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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], -80.0], N[(N[(z + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(a + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := b \cdot \log c\\
                                \mathbf{if}\;\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 \leq -80:\\
                                \;\;\;\;\left(z + t\_1\right) + y \cdot i\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(a + t\_1\right) + y \cdot i\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -80

                                  1. Initial program 99.9%

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

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

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

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

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

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

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

                                        if -80 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                        1. Initial program 99.8%

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

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

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

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

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

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

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

                                            Alternative 12: 54.6% accurate, 1.7× speedup?

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

                                              1. Initial program 99.8%

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

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

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

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

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

                                                \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
                                              6. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                                2. lift-log.f64N/A

                                                  \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                                3. lift-*.f6473.9

                                                  \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                              7. Applied rewrites73.9%

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

                                              if 85 < y

                                              1. Initial program 99.8%

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

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

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

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

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

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

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

                                                  Alternative 13: 53.1% accurate, 1.6× speedup?

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

                                                    1. Initial program 99.8%

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

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

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

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

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

                                                      \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
                                                    6. Step-by-step derivation
                                                      1. *-commutativeN/A

                                                        \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                                      2. lift-log.f64N/A

                                                        \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                                      3. lift-*.f6472.2

                                                        \[\leadsto \left(\left(\log y \cdot x + z\right) + t\right) + a \]
                                                    7. Applied rewrites72.2%

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

                                                    if 4.49999999999999959e59 < y < 5.5999999999999997e139

                                                    1. Initial program 99.9%

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

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

                                                        \[\leadsto \log c \cdot \color{blue}{b} + y \cdot i \]
                                                      2. lower-*.f64N/A

                                                        \[\leadsto \log c \cdot \color{blue}{b} + y \cdot i \]
                                                      3. lift-log.f6447.2

                                                        \[\leadsto \log c \cdot b + y \cdot i \]
                                                    4. Applied rewrites47.2%

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

                                                    if 5.5999999999999997e139 < y

                                                    1. Initial program 99.7%

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

                                                      \[\leadsto \color{blue}{a} + y \cdot i \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites62.9%

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

                                                    Alternative 14: 47.8% accurate, 0.4× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_2 \leq -50:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\left(t\_1 + t\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1 + y \cdot i\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a b c i)
                                                     :precision binary64
                                                     (let* ((t_1 (* (log y) x))
                                                            (t_2
                                                             (+
                                                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                                                              (* y i))))
                                                       (if (<= t_2 -50.0)
                                                         (fma y i z)
                                                         (if (<= t_2 5e+307) (+ (+ t_1 t) a) (+ t_1 (* y i))))))
                                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                    	double t_1 = log(y) * x;
                                                    	double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                                    	double tmp;
                                                    	if (t_2 <= -50.0) {
                                                    		tmp = fma(y, i, z);
                                                    	} else if (t_2 <= 5e+307) {
                                                    		tmp = (t_1 + t) + a;
                                                    	} else {
                                                    		tmp = t_1 + (y * i);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x, y, z, t, a, b, c, i)
                                                    	t_1 = Float64(log(y) * x)
                                                    	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                                                    	tmp = 0.0
                                                    	if (t_2 <= -50.0)
                                                    		tmp = fma(y, i, z);
                                                    	elseif (t_2 <= 5e+307)
                                                    		tmp = Float64(Float64(t_1 + t) + a);
                                                    	else
                                                    		tmp = Float64(t_1 + Float64(y * i));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[t$95$2, -50.0], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 5e+307], N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_1 := \log y \cdot x\\
                                                    t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                                                    \mathbf{if}\;t\_2 \leq -50:\\
                                                    \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                                                    
                                                    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+307}:\\
                                                    \;\;\;\;\left(t\_1 + t\right) + a\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;t\_1 + y \cdot i\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -50

                                                      1. Initial program 99.9%

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

                                                        \[\leadsto \color{blue}{z} + y \cdot i \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites38.4%

                                                          \[\leadsto \color{blue}{z} + y \cdot i \]
                                                        2. Step-by-step derivation
                                                          1. lift-+.f64N/A

                                                            \[\leadsto \color{blue}{z + y \cdot i} \]
                                                          2. +-commutativeN/A

                                                            \[\leadsto \color{blue}{y \cdot i + z} \]
                                                          3. lift-*.f64N/A

                                                            \[\leadsto \color{blue}{y \cdot i} + z \]
                                                          4. lower-fma.f6438.4

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                                        3. Applied rewrites38.4%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]

                                                        if -50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307

                                                        1. Initial program 99.8%

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

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

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

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

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

                                                          \[\leadsto \left(x \cdot \log y + t\right) + a \]
                                                        6. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                          2. lift-log.f64N/A

                                                            \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                          3. lift-*.f6450.9

                                                            \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                        7. Applied rewrites50.9%

                                                          \[\leadsto \left(\log y \cdot x + t\right) + a \]

                                                        if 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                        1. Initial program 99.3%

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

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

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

                                                            \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                                                          3. lift-log.f6495.4

                                                            \[\leadsto \log y \cdot x + y \cdot i \]
                                                        4. Applied rewrites95.4%

                                                          \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                                      4. Recombined 3 regimes into one program.
                                                      5. Add Preprocessing

                                                      Alternative 15: 45.0% accurate, 0.4× speedup?

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

                                                        1. Initial program 99.9%

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

                                                          \[\leadsto \color{blue}{z} + y \cdot i \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites38.4%

                                                            \[\leadsto \color{blue}{z} + y \cdot i \]
                                                          2. Step-by-step derivation
                                                            1. lift-+.f64N/A

                                                              \[\leadsto \color{blue}{z + y \cdot i} \]
                                                            2. +-commutativeN/A

                                                              \[\leadsto \color{blue}{y \cdot i + z} \]
                                                            3. lift-*.f64N/A

                                                              \[\leadsto \color{blue}{y \cdot i} + z \]
                                                            4. lower-fma.f6438.4

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                                          3. Applied rewrites38.4%

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]

                                                          if -50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 1.0000000000000001e276

                                                          1. Initial program 99.8%

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

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

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

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

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

                                                            \[\leadsto \left(x \cdot \log y + t\right) + a \]
                                                          6. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                            2. lift-log.f64N/A

                                                              \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                            3. lift-*.f6450.4

                                                              \[\leadsto \left(\log y \cdot x + t\right) + a \]
                                                          7. Applied rewrites50.4%

                                                            \[\leadsto \left(\log y \cdot x + t\right) + a \]

                                                          if 1.0000000000000001e276 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

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

                                                            \[\leadsto \color{blue}{a} + y \cdot i \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites54.0%

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

                                                          Alternative 16: 43.3% accurate, 0.4× speedup?

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

                                                            1. Initial program 99.9%

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

                                                              \[\leadsto \color{blue}{z} + y \cdot i \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites38.4%

                                                                \[\leadsto \color{blue}{z} + y \cdot i \]
                                                              2. Step-by-step derivation
                                                                1. lift-+.f64N/A

                                                                  \[\leadsto \color{blue}{z + y \cdot i} \]
                                                                2. +-commutativeN/A

                                                                  \[\leadsto \color{blue}{y \cdot i + z} \]
                                                                3. lift-*.f64N/A

                                                                  \[\leadsto \color{blue}{y \cdot i} + z \]
                                                                4. lower-fma.f6438.4

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                                              3. Applied rewrites38.4%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]

                                                              if -50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 1.0000000000000001e276

                                                              1. Initial program 99.8%

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

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

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

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

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

                                                                \[\leadsto x \cdot \log y + a \]
                                                              6. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \log y \cdot x + a \]
                                                                2. lift-log.f64N/A

                                                                  \[\leadsto \log y \cdot x + a \]
                                                                3. lift-*.f6434.0

                                                                  \[\leadsto \log y \cdot x + a \]
                                                              7. Applied rewrites34.0%

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

                                                              if 1.0000000000000001e276 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

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

                                                                \[\leadsto \color{blue}{a} + y \cdot i \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites54.0%

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

                                                              Alternative 17: 40.6% accurate, 0.8× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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 \leq -80:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \end{array} \]
                                                              (FPCore (x y z t a b c i)
                                                               :precision binary64
                                                               (if (<=
                                                                    (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
                                                                    -80.0)
                                                                 (fma y i z)
                                                                 (+ a (* y i))))
                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                              	double tmp;
                                                              	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -80.0) {
                                                              		tmp = fma(y, i, z);
                                                              	} else {
                                                              		tmp = a + (y * i);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x, y, z, t, a, b, c, i)
                                                              	tmp = 0.0
                                                              	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -80.0)
                                                              		tmp = fma(y, i, z);
                                                              	else
                                                              		tmp = Float64(a + Float64(y * i));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], -80.0], N[(y * i + z), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;\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 \leq -80:\\
                                                              \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;a + y \cdot i\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -80

                                                                1. Initial program 99.9%

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

                                                                  \[\leadsto \color{blue}{z} + y \cdot i \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites38.5%

                                                                    \[\leadsto \color{blue}{z} + y \cdot i \]
                                                                  2. Step-by-step derivation
                                                                    1. lift-+.f64N/A

                                                                      \[\leadsto \color{blue}{z + y \cdot i} \]
                                                                    2. +-commutativeN/A

                                                                      \[\leadsto \color{blue}{y \cdot i + z} \]
                                                                    3. lift-*.f64N/A

                                                                      \[\leadsto \color{blue}{y \cdot i} + z \]
                                                                    4. lower-fma.f6438.5

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                                                  3. Applied rewrites38.5%

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]

                                                                  if -80 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                                  1. Initial program 99.8%

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

                                                                    \[\leadsto \color{blue}{a} + y \cdot i \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites38.3%

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

                                                                  Alternative 18: 39.8% accurate, 0.4× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq 10^{+75}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;t + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                                                  (FPCore (x y z t a b c i)
                                                                   :precision binary64
                                                                   (let* ((t_1
                                                                           (+
                                                                            (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                                                                            (* y i))))
                                                                     (if (<= t_1 1e+75) (fma y i z) (if (<= t_1 5e+307) (+ t a) (* i y)))))
                                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                  	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                                                  	double tmp;
                                                                  	if (t_1 <= 1e+75) {
                                                                  		tmp = fma(y, i, z);
                                                                  	} else if (t_1 <= 5e+307) {
                                                                  		tmp = t + a;
                                                                  	} else {
                                                                  		tmp = i * y;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(x, y, z, t, a, b, c, i)
                                                                  	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                                                                  	tmp = 0.0
                                                                  	if (t_1 <= 1e+75)
                                                                  		tmp = fma(y, i, z);
                                                                  	elseif (t_1 <= 5e+307)
                                                                  		tmp = Float64(t + a);
                                                                  	else
                                                                  		tmp = Float64(i * y);
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 1e+75], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(t + a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  t_1 := \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\\
                                                                  \mathbf{if}\;t\_1 \leq 10^{+75}:\\
                                                                  \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                                                                  
                                                                  \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                                                                  \;\;\;\;t + a\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;i \cdot y\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.99999999999999927e74

                                                                    1. Initial program 99.8%

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

                                                                      \[\leadsto \color{blue}{z} + y \cdot i \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites37.5%

                                                                        \[\leadsto \color{blue}{z} + y \cdot i \]
                                                                      2. Step-by-step derivation
                                                                        1. lift-+.f64N/A

                                                                          \[\leadsto \color{blue}{z + y \cdot i} \]
                                                                        2. +-commutativeN/A

                                                                          \[\leadsto \color{blue}{y \cdot i + z} \]
                                                                        3. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{y \cdot i} + z \]
                                                                        4. lower-fma.f6437.5

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                                                      3. Applied rewrites37.5%

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]

                                                                      if 9.99999999999999927e74 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307

                                                                      1. Initial program 99.8%

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

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

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

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

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

                                                                        \[\leadsto t + a \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites35.5%

                                                                          \[\leadsto t + a \]

                                                                        if 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                                        1. Initial program 99.3%

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

                                                                          \[\leadsto \color{blue}{i \cdot y} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-*.f6492.8

                                                                            \[\leadsto i \cdot \color{blue}{y} \]
                                                                        4. Applied rewrites92.8%

                                                                          \[\leadsto \color{blue}{i \cdot y} \]
                                                                      7. Recombined 3 regimes into one program.
                                                                      8. Add Preprocessing

                                                                      Alternative 19: 38.4% accurate, 0.4× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                                                      (FPCore (x y z t a b c i)
                                                                       :precision binary64
                                                                       (let* ((t_1
                                                                               (+
                                                                                (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                                                                                (* y i))))
                                                                         (if (<= t_1 -2e+307) (* i y) (if (<= t_1 5e+307) (+ z a) (* i y)))))
                                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                      	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                                                      	double tmp;
                                                                      	if (t_1 <= -2e+307) {
                                                                      		tmp = i * y;
                                                                      	} else if (t_1 <= 5e+307) {
                                                                      		tmp = z + a;
                                                                      	} else {
                                                                      		tmp = i * y;
                                                                      	}
                                                                      	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) :: t_1
                                                                          real(8) :: tmp
                                                                          t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                                                                          if (t_1 <= (-2d+307)) then
                                                                              tmp = i * y
                                                                          else if (t_1 <= 5d+307) then
                                                                              tmp = z + a
                                                                          else
                                                                              tmp = i * y
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                      	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                                                                      	double tmp;
                                                                      	if (t_1 <= -2e+307) {
                                                                      		tmp = i * y;
                                                                      	} else if (t_1 <= 5e+307) {
                                                                      		tmp = z + a;
                                                                      	} else {
                                                                      		tmp = i * y;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      def code(x, y, z, t, a, b, c, i):
                                                                      	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                                                                      	tmp = 0
                                                                      	if t_1 <= -2e+307:
                                                                      		tmp = i * y
                                                                      	elif t_1 <= 5e+307:
                                                                      		tmp = z + a
                                                                      	else:
                                                                      		tmp = i * y
                                                                      	return tmp
                                                                      
                                                                      function code(x, y, z, t, a, b, c, i)
                                                                      	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                                                                      	tmp = 0.0
                                                                      	if (t_1 <= -2e+307)
                                                                      		tmp = Float64(i * y);
                                                                      	elseif (t_1 <= 5e+307)
                                                                      		tmp = Float64(z + a);
                                                                      	else
                                                                      		tmp = Float64(i * y);
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                      	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                                                      	tmp = 0.0;
                                                                      	if (t_1 <= -2e+307)
                                                                      		tmp = i * y;
                                                                      	elseif (t_1 <= 5e+307)
                                                                      		tmp = z + a;
                                                                      	else
                                                                      		tmp = i * y;
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(z + a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      t_1 := \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\\
                                                                      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+307}:\\
                                                                      \;\;\;\;i \cdot y\\
                                                                      
                                                                      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                                                                      \;\;\;\;z + a\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;i \cdot y\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1.99999999999999997e307 or 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                                        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. Taylor expanded in y around inf

                                                                          \[\leadsto \color{blue}{i \cdot y} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-*.f6491.8

                                                                            \[\leadsto i \cdot \color{blue}{y} \]
                                                                        4. Applied rewrites91.8%

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

                                                                        if -1.99999999999999997e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307

                                                                        1. Initial program 99.8%

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

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

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

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

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

                                                                          \[\leadsto z + a \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites35.3%

                                                                            \[\leadsto z + a \]
                                                                        7. Recombined 2 regimes into one program.
                                                                        8. Add Preprocessing

                                                                        Alternative 20: 30.8% accurate, 0.9× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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 \leq -50:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \end{array} \]
                                                                        (FPCore (x y z t a b c i)
                                                                         :precision binary64
                                                                         (if (<=
                                                                              (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
                                                                              -50.0)
                                                                           z
                                                                           (+ t a)))
                                                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                        	double tmp;
                                                                        	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -50.0) {
                                                                        		tmp = z;
                                                                        	} else {
                                                                        		tmp = t + 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 * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-50.0d0)) then
                                                                                tmp = z
                                                                            else
                                                                                tmp = t + a
                                                                            end if
                                                                            code = tmp
                                                                        end function
                                                                        
                                                                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                        	double tmp;
                                                                        	if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -50.0) {
                                                                        		tmp = z;
                                                                        	} else {
                                                                        		tmp = t + a;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(x, y, z, t, a, b, c, i):
                                                                        	tmp = 0
                                                                        	if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -50.0:
                                                                        		tmp = z
                                                                        	else:
                                                                        		tmp = t + a
                                                                        	return tmp
                                                                        
                                                                        function code(x, y, z, t, a, b, c, i)
                                                                        	tmp = 0.0
                                                                        	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -50.0)
                                                                        		tmp = z;
                                                                        	else
                                                                        		tmp = Float64(t + a);
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                        	tmp = 0.0;
                                                                        	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -50.0)
                                                                        		tmp = z;
                                                                        	else
                                                                        		tmp = t + a;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], -50.0], z, N[(t + a), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;\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 \leq -50:\\
                                                                        \;\;\;\;z\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;t + a\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -50

                                                                          1. Initial program 99.9%

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

                                                                            \[\leadsto \color{blue}{z} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites16.0%

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

                                                                            if -50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                                            1. Initial program 99.8%

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

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

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

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

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

                                                                              \[\leadsto t + a \]
                                                                            6. Step-by-step derivation
                                                                              1. Applied rewrites30.3%

                                                                                \[\leadsto t + a \]
                                                                            7. Recombined 2 regimes into one program.
                                                                            8. Add Preprocessing

                                                                            Alternative 21: 23.2% accurate, 0.9× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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 \leq -50:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                                                            (FPCore (x y z t a b c i)
                                                                             :precision binary64
                                                                             (if (<=
                                                                                  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
                                                                                  -50.0)
                                                                               z
                                                                               a))
                                                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                            	double tmp;
                                                                            	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -50.0) {
                                                                            		tmp = z;
                                                                            	} else {
                                                                            		tmp = 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 * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-50.0d0)) then
                                                                                    tmp = z
                                                                                else
                                                                                    tmp = a
                                                                                end if
                                                                                code = tmp
                                                                            end function
                                                                            
                                                                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                            	double tmp;
                                                                            	if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -50.0) {
                                                                            		tmp = z;
                                                                            	} else {
                                                                            		tmp = a;
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            def code(x, y, z, t, a, b, c, i):
                                                                            	tmp = 0
                                                                            	if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -50.0:
                                                                            		tmp = z
                                                                            	else:
                                                                            		tmp = a
                                                                            	return tmp
                                                                            
                                                                            function code(x, y, z, t, a, b, c, i)
                                                                            	tmp = 0.0
                                                                            	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -50.0)
                                                                            		tmp = z;
                                                                            	else
                                                                            		tmp = a;
                                                                            	end
                                                                            	return tmp
                                                                            end
                                                                            
                                                                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                            	tmp = 0.0;
                                                                            	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -50.0)
                                                                            		tmp = z;
                                                                            	else
                                                                            		tmp = a;
                                                                            	end
                                                                            	tmp_2 = tmp;
                                                                            end
                                                                            
                                                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], -50.0], z, a]
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            \mathbf{if}\;\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 \leq -50:\\
                                                                            \;\;\;\;z\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;a\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -50

                                                                              1. Initial program 99.9%

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

                                                                                \[\leadsto \color{blue}{z} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites16.0%

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

                                                                                if -50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                                                                                1. Initial program 99.8%

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

                                                                                  \[\leadsto \color{blue}{a} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites16.2%

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

                                                                                Alternative 22: 16.4% accurate, 10.1× speedup?

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

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

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

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

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

                                                                                  \[\leadsto z + a \]
                                                                                6. Step-by-step derivation
                                                                                  1. Applied rewrites30.8%

                                                                                    \[\leadsto z + a \]
                                                                                  2. Add Preprocessing

                                                                                  Alternative 23: 16.1% accurate, 37.6× speedup?

                                                                                  \[\begin{array}{l} \\ a \end{array} \]
                                                                                  (FPCore (x y z t a b c i) :precision binary64 a)
                                                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                  	return a;
                                                                                  }
                                                                                  
                                                                                  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 = a
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                  	return a;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b, c, i):
                                                                                  	return a
                                                                                  
                                                                                  function code(x, y, z, t, a, b, c, i)
                                                                                  	return a
                                                                                  end
                                                                                  
                                                                                  function tmp = code(x, y, z, t, a, b, c, i)
                                                                                  	tmp = a;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := a
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  a
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Initial program 99.8%

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

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

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

                                                                                    Reproduce

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