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

Percentage Accurate: 99.8% → 99.8%
Time: 7.9s
Alternatives: 14
Speedup: 0.9×

Specification

?
\[\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 \]
(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]
\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

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 14 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?

\[\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 \]
(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]
\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

Alternative 1: 99.8% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.0% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log y, x, \left(\mathsf{fma}\left(-0.5, \log c, a\right) + t\right) + z\right)\right)\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z + \mathsf{fma}\left(b - 0.5, \log c, t + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma y i (fma (log y) x (+ (+ (fma -0.5 (log c) a) t) z)))))
   (if (<= x -1.95e+139)
     t_1
     (if (<= x 1.22e+124)
       (fma y i (+ z (fma (- b 0.5) (log c) (+ 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(y), x, ((fma(-0.5, log(c), a) + t) + z)));
	double tmp;
	if (x <= -1.95e+139) {
		tmp = t_1;
	} else if (x <= 1.22e+124) {
		tmp = fma(y, i, (z + fma((b - 0.5), log(c), (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(y), x, Float64(Float64(fma(-0.5, log(c), a) + t) + z)))
	tmp = 0.0
	if (x <= -1.95e+139)
		tmp = t_1;
	elseif (x <= 1.22e+124)
		tmp = fma(y, i, Float64(z + fma(Float64(b - 0.5), log(c), Float64(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[y], $MachinePrecision] * x + N[(N[(N[(-0.5 * N[Log[c], $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+139], t$95$1, If[LessEqual[x, 1.22e+124], N[(y * i + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log y, x, \left(\mathsf{fma}\left(-0.5, \log c, a\right) + t\right) + z\right)\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.22 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z + \mathsf{fma}\left(b - 0.5, \log c, t + a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.95000000000000003e139 or 1.22e124 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.95000000000000003e139 < x < 1.22e124

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 91.5% accurate, 1.1× speedup?

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

        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 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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -7.09999999999999985e221 < x < 2.80000000000000013e209

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.80000000000000013e209 < x

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
          5. Step-by-step derivation
            1. Applied rewrites38.7%

              \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
          6. Recombined 3 regimes into one program.
          7. Add Preprocessing

          Alternative 4: 90.6% accurate, 1.2× speedup?

          \[\begin{array}{l} t_1 := 1 \cdot \left(\log y \cdot x\right) + y \cdot i\\ \mathbf{if}\;x \leq -7.1 \cdot 10^{+221}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+209}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z + \mathsf{fma}\left(b - 0.5, \log c, t + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (+ (* 1.0 (* (log y) x)) (* y i))))
             (if (<= x -7.1e+221)
               t_1
               (if (<= x 2.8e+209)
                 (fma y i (+ z (fma (- b 0.5) (log c) (+ 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 = (1.0 * (log(y) * x)) + (y * i);
          	double tmp;
          	if (x <= -7.1e+221) {
          		tmp = t_1;
          	} else if (x <= 2.8e+209) {
          		tmp = fma(y, i, (z + fma((b - 0.5), log(c), (t + a))));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(1.0 * Float64(log(y) * x)) + Float64(y * i))
          	tmp = 0.0
          	if (x <= -7.1e+221)
          		tmp = t_1;
          	elseif (x <= 2.8e+209)
          		tmp = fma(y, i, Float64(z + fma(Float64(b - 0.5), log(c), Float64(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[(1.0 * N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.1e+221], t$95$1, If[LessEqual[x, 2.8e+209], N[(y * i + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := 1 \cdot \left(\log y \cdot x\right) + y \cdot i\\
          \mathbf{if}\;x \leq -7.1 \cdot 10^{+221}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;x \leq 2.8 \cdot 10^{+209}:\\
          \;\;\;\;\mathsf{fma}\left(y, i, z + \mathsf{fma}\left(b - 0.5, \log c, t + a\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -7.09999999999999985e221 or 2.80000000000000013e209 < x

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
            5. Step-by-step derivation
              1. Applied rewrites38.7%

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

              if -7.09999999999999985e221 < x < 2.80000000000000013e209

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 78.3% accurate, 1.0× speedup?

              \[\begin{array}{l} t_1 := \left(\mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right) + z\right) + \mathsf{min}\left(t, a\right)\\ \mathbf{if}\;b \leq -1.15 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, -0.5, z\right) + \mathsf{max}\left(t, a\right)\right) + \mathsf{min}\left(t, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (+ (+ (fma i y (* (log c) (- b 0.5))) z) (fmin t a))))
                 (if (<= b -1.15e+212)
                   t_1
                   (if (<= b 2.8e+143)
                     (fma y i (+ (+ (fma (log c) -0.5 z) (fmax t a)) (fmin 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(i, y, (log(c) * (b - 0.5))) + z) + fmin(t, a);
              	double tmp;
              	if (b <= -1.15e+212) {
              		tmp = t_1;
              	} else if (b <= 2.8e+143) {
              		tmp = fma(y, i, ((fma(log(c), -0.5, z) + fmax(t, a)) + fmin(t, a)));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(Float64(fma(i, y, Float64(log(c) * Float64(b - 0.5))) + z) + fmin(t, a))
              	tmp = 0.0
              	if (b <= -1.15e+212)
              		tmp = t_1;
              	elseif (b <= 2.8e+143)
              		tmp = fma(y, i, Float64(Float64(fma(log(c), -0.5, z) + fmax(t, a)) + fmin(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[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + N[Min[t, a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.15e+212], t$95$1, If[LessEqual[b, 2.8e+143], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * -0.5 + z), $MachinePrecision] + N[Max[t, a], $MachinePrecision]), $MachinePrecision] + N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              t_1 := \left(\mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right) + z\right) + \mathsf{min}\left(t, a\right)\\
              \mathbf{if}\;b \leq -1.15 \cdot 10^{+212}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \leq 2.8 \cdot 10^{+143}:\\
              \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, -0.5, z\right) + \mathsf{max}\left(t, a\right)\right) + \mathsf{min}\left(t, a\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if b < -1.1499999999999999e212 or 2.79999999999999998e143 < b

                1. Initial program 99.8%

                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                2. 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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.1499999999999999e212 < b < 2.79999999999999998e143

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 73.2% accurate, 1.3× speedup?

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

                    1. Initial program 99.8%

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

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

                        \[\leadsto b \cdot \color{blue}{\log c} \]
                      2. lower-log.f6416.8%

                        \[\leadsto b \cdot \log c \]
                    4. Applied rewrites16.8%

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

                    if -1.1499999999999999e212 < b < 3.50000000000000033e240

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 7: 62.6% accurate, 0.2× speedup?

                      \[\begin{array}{l} t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_3 := \left(\left(\left(\left(x \cdot \log y + \mathsf{min}\left(z, a\right)\right) + t\_1\right) + t\_2\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_3 \leq 100:\\ \;\;\;\;\left(\mathsf{fma}\left(i, y, \log c \cdot -0.5\right) + \mathsf{min}\left(z, a\right)\right) + t\_1\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+180}:\\ \;\;\;\;\left(\left(-i\right) - \frac{t\_2}{y}\right) \cdot \left(-y\right)\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_2\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\log y \cdot x\right) + y \cdot i\\ \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (fmin t (fmax z a)))
                              (t_2 (fmax t (fmax z a)))
                              (t_3
                               (+
                                (+
                                 (+ (+ (+ (* x (log y)) (fmin z a)) t_1) t_2)
                                 (* (- b 0.5) (log c)))
                                (* y i))))
                         (if (<= t_3 100.0)
                           (+ (+ (fma i y (* (log c) -0.5)) (fmin z a)) t_1)
                           (if (<= t_3 2e+180)
                             (* (- (- i) (/ t_2 y)) (- y))
                             (if (<= t_3 2e+305) (- (- t_2)) (+ (* 1.0 (* (log y) x)) (* y i)))))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fmin(t, fmax(z, a));
                      	double t_2 = fmax(t, fmax(z, a));
                      	double t_3 = (((((x * log(y)) + fmin(z, a)) + t_1) + t_2) + ((b - 0.5) * log(c))) + (y * i);
                      	double tmp;
                      	if (t_3 <= 100.0) {
                      		tmp = (fma(i, y, (log(c) * -0.5)) + fmin(z, a)) + t_1;
                      	} else if (t_3 <= 2e+180) {
                      		tmp = (-i - (t_2 / y)) * -y;
                      	} else if (t_3 <= 2e+305) {
                      		tmp = -(-t_2);
                      	} else {
                      		tmp = (1.0 * (log(y) * x)) + (y * i);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = fmin(t, fmax(z, a))
                      	t_2 = fmax(t, fmax(z, a))
                      	t_3 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + fmin(z, a)) + t_1) + t_2) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                      	tmp = 0.0
                      	if (t_3 <= 100.0)
                      		tmp = Float64(Float64(fma(i, y, Float64(log(c) * -0.5)) + fmin(z, a)) + t_1);
                      	elseif (t_3 <= 2e+180)
                      		tmp = Float64(Float64(Float64(-i) - Float64(t_2 / y)) * Float64(-y));
                      	elseif (t_3 <= 2e+305)
                      		tmp = Float64(-Float64(-t_2));
                      	else
                      		tmp = Float64(Float64(1.0 * Float64(log(y) * x)) + Float64(y * i));
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[Min[z, a], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 100.0], N[(N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[Min[z, a], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 2e+180], N[(N[((-i) - N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t$95$3, 2e+305], (-(-t$95$2)), N[(N[(1.0 * N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]]
                      
                      \begin{array}{l}
                      t_1 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\
                      t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
                      t_3 := \left(\left(\left(\left(x \cdot \log y + \mathsf{min}\left(z, a\right)\right) + t\_1\right) + t\_2\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                      \mathbf{if}\;t\_3 \leq 100:\\
                      \;\;\;\;\left(\mathsf{fma}\left(i, y, \log c \cdot -0.5\right) + \mathsf{min}\left(z, a\right)\right) + t\_1\\
                      
                      \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+180}:\\
                      \;\;\;\;\left(\left(-i\right) - \frac{t\_2}{y}\right) \cdot \left(-y\right)\\
                      
                      \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+305}:\\
                      \;\;\;\;-\left(-t\_2\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;1 \cdot \left(\log y \cdot x\right) + y \cdot i\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 4 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)) < 100

                        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 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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\mathsf{fma}\left(i, y, \log c \cdot \frac{-1}{2}\right) + z\right) + t \]
                        11. Step-by-step derivation
                          1. Applied rewrites54.0%

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

                          if 100 < (+.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)) < 2e180

                          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 y around -inf

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

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                          6. Step-by-step derivation
                            1. lower-/.f6432.3%

                              \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                          7. Applied rewrites32.3%

                            \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                            3. lift-*.f64N/A

                              \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                            4. *-commutativeN/A

                              \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot y\right) \]
                            5. distribute-rgt-neg-inN/A

                              \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                            6. lower-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                          9. Applied rewrites32.3%

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

                          if 2e180 < (+.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.9999999999999999e305

                          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 y around -inf

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

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6416.4%

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites16.4%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6416.4%

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lift-neg.f6416.4%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites16.4%

                            \[\leadsto \color{blue}{-\left(-a\right)} \]

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
                          5. Step-by-step derivation
                            1. Applied rewrites38.7%

                              \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
                          6. Recombined 4 regimes into one program.
                          7. Add Preprocessing

                          Alternative 8: 55.8% accurate, 0.1× speedup?

                          \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := 1 \cdot \left(\log y \cdot x\right) + y \cdot i\\ t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right)\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -4 \cdot 10^{+299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq -0.5:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\ \;\;\;\;\left(\left(-i\right) - \frac{t\_4}{y}\right) \cdot \left(-y\right)\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                          (FPCore (x y z t a b c i)
                           :precision binary64
                           (let* ((t_1 (fmin (fmin z t) a))
                                  (t_2 (+ (* 1.0 (* (log y) x)) (* y i)))
                                  (t_3 (fmax (fmin z t) a))
                                  (t_4 (fmax (fmax z t) t_3))
                                  (t_5
                                   (+
                                    (+
                                     (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_3)) t_4)
                                     (* (- b 0.5) (log c)))
                                    (* y i))))
                             (if (<= t_5 -4e+299)
                               t_2
                               (if (<= t_5 -0.5)
                                 (- (* -1.0 t_1))
                                 (if (<= t_5 2e+180)
                                   (* (- (- i) (/ t_4 y)) (- y))
                                   (if (<= t_5 2e+305) (- (- t_4)) t_2))))))
                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                          	double t_1 = fmin(fmin(z, t), a);
                          	double t_2 = (1.0 * (log(y) * x)) + (y * i);
                          	double t_3 = fmax(fmin(z, t), a);
                          	double t_4 = fmax(fmax(z, t), t_3);
                          	double t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                          	double tmp;
                          	if (t_5 <= -4e+299) {
                          		tmp = t_2;
                          	} else if (t_5 <= -0.5) {
                          		tmp = -(-1.0 * t_1);
                          	} else if (t_5 <= 2e+180) {
                          		tmp = (-i - (t_4 / y)) * -y;
                          	} else if (t_5 <= 2e+305) {
                          		tmp = -(-t_4);
                          	} else {
                          		tmp = t_2;
                          	}
                          	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) :: t_2
                              real(8) :: t_3
                              real(8) :: t_4
                              real(8) :: t_5
                              real(8) :: tmp
                              t_1 = fmin(fmin(z, t), a)
                              t_2 = (1.0d0 * (log(y) * x)) + (y * i)
                              t_3 = fmax(fmin(z, t), a)
                              t_4 = fmax(fmax(z, t), t_3)
                              t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5d0) * log(c))) + (y * i)
                              if (t_5 <= (-4d+299)) then
                                  tmp = t_2
                              else if (t_5 <= (-0.5d0)) then
                                  tmp = -((-1.0d0) * t_1)
                              else if (t_5 <= 2d+180) then
                                  tmp = (-i - (t_4 / y)) * -y
                              else if (t_5 <= 2d+305) then
                                  tmp = -(-t_4)
                              else
                                  tmp = t_2
                              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 = fmin(fmin(z, t), a);
                          	double t_2 = (1.0 * (Math.log(y) * x)) + (y * i);
                          	double t_3 = fmax(fmin(z, t), a);
                          	double t_4 = fmax(fmax(z, t), t_3);
                          	double t_5 = (((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * Math.log(c))) + (y * i);
                          	double tmp;
                          	if (t_5 <= -4e+299) {
                          		tmp = t_2;
                          	} else if (t_5 <= -0.5) {
                          		tmp = -(-1.0 * t_1);
                          	} else if (t_5 <= 2e+180) {
                          		tmp = (-i - (t_4 / y)) * -y;
                          	} else if (t_5 <= 2e+305) {
                          		tmp = -(-t_4);
                          	} else {
                          		tmp = t_2;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b, c, i):
                          	t_1 = fmin(fmin(z, t), a)
                          	t_2 = (1.0 * (math.log(y) * x)) + (y * i)
                          	t_3 = fmax(fmin(z, t), a)
                          	t_4 = fmax(fmax(z, t), t_3)
                          	t_5 = (((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * math.log(c))) + (y * i)
                          	tmp = 0
                          	if t_5 <= -4e+299:
                          		tmp = t_2
                          	elif t_5 <= -0.5:
                          		tmp = -(-1.0 * t_1)
                          	elif t_5 <= 2e+180:
                          		tmp = (-i - (t_4 / y)) * -y
                          	elif t_5 <= 2e+305:
                          		tmp = -(-t_4)
                          	else:
                          		tmp = t_2
                          	return tmp
                          
                          function code(x, y, z, t, a, b, c, i)
                          	t_1 = fmin(fmin(z, t), a)
                          	t_2 = Float64(Float64(1.0 * Float64(log(y) * x)) + Float64(y * i))
                          	t_3 = fmax(fmin(z, t), a)
                          	t_4 = fmax(fmax(z, t), t_3)
                          	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                          	tmp = 0.0
                          	if (t_5 <= -4e+299)
                          		tmp = t_2;
                          	elseif (t_5 <= -0.5)
                          		tmp = Float64(-Float64(-1.0 * t_1));
                          	elseif (t_5 <= 2e+180)
                          		tmp = Float64(Float64(Float64(-i) - Float64(t_4 / y)) * Float64(-y));
                          	elseif (t_5 <= 2e+305)
                          		tmp = Float64(-Float64(-t_4));
                          	else
                          		tmp = t_2;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b, c, i)
                          	t_1 = min(min(z, t), a);
                          	t_2 = (1.0 * (log(y) * x)) + (y * i);
                          	t_3 = max(min(z, t), a);
                          	t_4 = max(max(z, t), t_3);
                          	t_5 = (((((x * log(y)) + t_1) + min(max(z, t), t_3)) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                          	tmp = 0.0;
                          	if (t_5 <= -4e+299)
                          		tmp = t_2;
                          	elseif (t_5 <= -0.5)
                          		tmp = -(-1.0 * t_1);
                          	elseif (t_5 <= 2e+180)
                          		tmp = (-i - (t_4 / y)) * -y;
                          	elseif (t_5 <= 2e+305)
                          		tmp = -(-t_4);
                          	else
                          		tmp = t_2;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 * N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -4e+299], t$95$2, If[LessEqual[t$95$5, -0.5], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 2e+180], N[(N[((-i) - N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t$95$5, 2e+305], (-(-t$95$4)), t$95$2]]]]]]]]]
                          
                          \begin{array}{l}
                          t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                          t_2 := 1 \cdot \left(\log y \cdot x\right) + y \cdot i\\
                          t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                          t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\
                          t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right)\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                          \mathbf{if}\;t\_5 \leq -4 \cdot 10^{+299}:\\
                          \;\;\;\;t\_2\\
                          
                          \mathbf{elif}\;t\_5 \leq -0.5:\\
                          \;\;\;\;--1 \cdot t\_1\\
                          
                          \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\
                          \;\;\;\;\left(\left(-i\right) - \frac{t\_4}{y}\right) \cdot \left(-y\right)\\
                          
                          \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\
                          \;\;\;\;-\left(-t\_4\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_2\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 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)) < -4.0000000000000002e299 or 1.9999999999999999e305 < (+.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. Step-by-step derivation
                              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) + y \cdot i \]
                            5. Step-by-step derivation
                              1. Applied rewrites38.7%

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

                              if -4.0000000000000002e299 < (+.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)) < -0.5

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                              10. Taylor expanded in z around inf

                                \[\leadsto --1 \cdot z \]
                              11. Step-by-step derivation
                                1. lower-*.f6416.0%

                                  \[\leadsto --1 \cdot z \]
                              12. Applied rewrites16.0%

                                \[\leadsto --1 \cdot z \]

                              if -0.5 < (+.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)) < 2e180

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.3%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              7. Applied rewrites32.3%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot y\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                              9. Applied rewrites32.3%

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

                              if 2e180 < (+.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.9999999999999999e305

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            6. Recombined 4 regimes into one program.
                            7. Add Preprocessing

                            Alternative 9: 55.6% accurate, 0.1× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -1 \cdot 10^{+292}:\\ \;\;\;\;-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t\_1}{y}\right)\right)\\ \mathbf{elif}\;t\_5 \leq -0.5:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (let* ((t_1 (fmin (fmin z t) a))
                                    (t_2 (fmax (fmin z t) a))
                                    (t_3 (fmax (fmax z t) t_2))
                                    (t_4 (* (- (- i) (/ t_3 y)) (- y)))
                                    (t_5
                                     (+
                                      (+
                                       (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_2)) t_3)
                                       (* (- b 0.5) (log c)))
                                      (* y i))))
                               (if (<= t_5 -1e+292)
                                 (* -1.0 (* y (fma -1.0 i (* -1.0 (/ t_1 y)))))
                                 (if (<= t_5 -0.5)
                                   (- (* -1.0 t_1))
                                   (if (<= t_5 2e+180) t_4 (if (<= t_5 2e+305) (- (- t_3)) t_4))))))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmax(fmax(z, t), t_2);
                            	double t_4 = (-i - (t_3 / y)) * -y;
                            	double t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
                            	double tmp;
                            	if (t_5 <= -1e+292) {
                            		tmp = -1.0 * (y * fma(-1.0, i, (-1.0 * (t_1 / y))));
                            	} else if (t_5 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_5 <= 2e+180) {
                            		tmp = t_4;
                            	} else if (t_5 <= 2e+305) {
                            		tmp = -(-t_3);
                            	} else {
                            		tmp = t_4;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b, c, i)
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmax(fmax(z, t), t_2)
                            	t_4 = Float64(Float64(Float64(-i) - Float64(t_3 / y)) * Float64(-y))
                            	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                            	tmp = 0.0
                            	if (t_5 <= -1e+292)
                            		tmp = Float64(-1.0 * Float64(y * fma(-1.0, i, Float64(-1.0 * Float64(t_1 / y)))));
                            	elseif (t_5 <= -0.5)
                            		tmp = Float64(-Float64(-1.0 * t_1));
                            	elseif (t_5 <= 2e+180)
                            		tmp = t_4;
                            	elseif (t_5 <= 2e+305)
                            		tmp = Float64(-Float64(-t_3));
                            	else
                            		tmp = t_4;
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[((-i) - N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -1e+292], N[(-1.0 * N[(y * N[(-1.0 * i + N[(-1.0 * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -0.5], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 2e+180], t$95$4, If[LessEqual[t$95$5, 2e+305], (-(-t$95$3)), t$95$4]]]]]]]]]
                            
                            \begin{array}{l}
                            t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                            t_4 := \left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\
                            t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                            \mathbf{if}\;t\_5 \leq -1 \cdot 10^{+292}:\\
                            \;\;\;\;-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t\_1}{y}\right)\right)\\
                            
                            \mathbf{elif}\;t\_5 \leq -0.5:\\
                            \;\;\;\;--1 \cdot t\_1\\
                            
                            \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\
                            \;\;\;\;t\_4\\
                            
                            \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\
                            \;\;\;\;-\left(-t\_3\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_4\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 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)) < -1e292

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{z}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.2%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{z}{y}\right)\right) \]
                              7. Applied rewrites32.2%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{z}{y}\right)\right) \]

                              if -1e292 < (+.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)) < -0.5

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                              10. Taylor expanded in z around inf

                                \[\leadsto --1 \cdot z \]
                              11. Step-by-step derivation
                                1. lower-*.f6416.0%

                                  \[\leadsto --1 \cdot z \]
                              12. Applied rewrites16.0%

                                \[\leadsto --1 \cdot z \]

                              if -0.5 < (+.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)) < 2e180 or 1.9999999999999999e305 < (+.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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.3%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              7. Applied rewrites32.3%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot y\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                              9. Applied rewrites32.3%

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

                              if 2e180 < (+.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.9999999999999999e305

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            3. Recombined 4 regimes into one program.
                            4. Add Preprocessing

                            Alternative 10: 55.2% accurate, 0.1× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_5 := \left(\left(-i\right) - \frac{t\_4}{y}\right) \cdot \left(-y\right)\\ t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_6 \leq -2 \cdot 10^{+300}:\\ \;\;\;\;\left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\ \mathbf{elif}\;t\_6 \leq -0.5:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+180}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (let* ((t_1 (fmin (fmin z t) a))
                                    (t_2 (fmax (fmin z t) a))
                                    (t_3 (fmin (fmax z t) t_2))
                                    (t_4 (fmax (fmax z t) t_2))
                                    (t_5 (* (- (- i) (/ t_4 y)) (- y)))
                                    (t_6
                                     (+
                                      (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                                      (* y i))))
                               (if (<= t_6 -2e+300)
                                 (* (- (- i) (/ t_3 y)) (- y))
                                 (if (<= t_6 -0.5)
                                   (- (* -1.0 t_1))
                                   (if (<= t_6 2e+180) t_5 (if (<= t_6 2e+305) (- (- t_4)) t_5))))))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmin(fmax(z, t), t_2);
                            	double t_4 = fmax(fmax(z, t), t_2);
                            	double t_5 = (-i - (t_4 / y)) * -y;
                            	double t_6 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                            	double tmp;
                            	if (t_6 <= -2e+300) {
                            		tmp = (-i - (t_3 / y)) * -y;
                            	} else if (t_6 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_6 <= 2e+180) {
                            		tmp = t_5;
                            	} else if (t_6 <= 2e+305) {
                            		tmp = -(-t_4);
                            	} else {
                            		tmp = t_5;
                            	}
                            	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) :: t_2
                                real(8) :: t_3
                                real(8) :: t_4
                                real(8) :: t_5
                                real(8) :: t_6
                                real(8) :: tmp
                                t_1 = fmin(fmin(z, t), a)
                                t_2 = fmax(fmin(z, t), a)
                                t_3 = fmin(fmax(z, t), t_2)
                                t_4 = fmax(fmax(z, t), t_2)
                                t_5 = (-i - (t_4 / y)) * -y
                                t_6 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5d0) * log(c))) + (y * i)
                                if (t_6 <= (-2d+300)) then
                                    tmp = (-i - (t_3 / y)) * -y
                                else if (t_6 <= (-0.5d0)) then
                                    tmp = -((-1.0d0) * t_1)
                                else if (t_6 <= 2d+180) then
                                    tmp = t_5
                                else if (t_6 <= 2d+305) then
                                    tmp = -(-t_4)
                                else
                                    tmp = t_5
                                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 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmin(fmax(z, t), t_2);
                            	double t_4 = fmax(fmax(z, t), t_2);
                            	double t_5 = (-i - (t_4 / y)) * -y;
                            	double t_6 = (((((x * Math.log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * Math.log(c))) + (y * i);
                            	double tmp;
                            	if (t_6 <= -2e+300) {
                            		tmp = (-i - (t_3 / y)) * -y;
                            	} else if (t_6 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_6 <= 2e+180) {
                            		tmp = t_5;
                            	} else if (t_6 <= 2e+305) {
                            		tmp = -(-t_4);
                            	} else {
                            		tmp = t_5;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmin(fmax(z, t), t_2)
                            	t_4 = fmax(fmax(z, t), t_2)
                            	t_5 = (-i - (t_4 / y)) * -y
                            	t_6 = (((((x * math.log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * math.log(c))) + (y * i)
                            	tmp = 0
                            	if t_6 <= -2e+300:
                            		tmp = (-i - (t_3 / y)) * -y
                            	elif t_6 <= -0.5:
                            		tmp = -(-1.0 * t_1)
                            	elif t_6 <= 2e+180:
                            		tmp = t_5
                            	elif t_6 <= 2e+305:
                            		tmp = -(-t_4)
                            	else:
                            		tmp = t_5
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmin(fmax(z, t), t_2)
                            	t_4 = fmax(fmax(z, t), t_2)
                            	t_5 = Float64(Float64(Float64(-i) - Float64(t_4 / y)) * Float64(-y))
                            	t_6 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                            	tmp = 0.0
                            	if (t_6 <= -2e+300)
                            		tmp = Float64(Float64(Float64(-i) - Float64(t_3 / y)) * Float64(-y));
                            	elseif (t_6 <= -0.5)
                            		tmp = Float64(-Float64(-1.0 * t_1));
                            	elseif (t_6 <= 2e+180)
                            		tmp = t_5;
                            	elseif (t_6 <= 2e+305)
                            		tmp = Float64(-Float64(-t_4));
                            	else
                            		tmp = t_5;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	t_1 = min(min(z, t), a);
                            	t_2 = max(min(z, t), a);
                            	t_3 = min(max(z, t), t_2);
                            	t_4 = max(max(z, t), t_2);
                            	t_5 = (-i - (t_4 / y)) * -y;
                            	t_6 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                            	tmp = 0.0;
                            	if (t_6 <= -2e+300)
                            		tmp = (-i - (t_3 / y)) * -y;
                            	elseif (t_6 <= -0.5)
                            		tmp = -(-1.0 * t_1);
                            	elseif (t_6 <= 2e+180)
                            		tmp = t_5;
                            	elseif (t_6 <= 2e+305)
                            		tmp = -(-t_4);
                            	else
                            		tmp = t_5;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[((-i) - N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -2e+300], N[(N[((-i) - N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t$95$6, -0.5], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$6, 2e+180], t$95$5, If[LessEqual[t$95$6, 2e+305], (-(-t$95$4)), t$95$5]]]]]]]]]]
                            
                            \begin{array}{l}
                            t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                            t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                            t_5 := \left(\left(-i\right) - \frac{t\_4}{y}\right) \cdot \left(-y\right)\\
                            t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                            \mathbf{if}\;t\_6 \leq -2 \cdot 10^{+300}:\\
                            \;\;\;\;\left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\
                            
                            \mathbf{elif}\;t\_6 \leq -0.5:\\
                            \;\;\;\;--1 \cdot t\_1\\
                            
                            \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+180}:\\
                            \;\;\;\;t\_5\\
                            
                            \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+305}:\\
                            \;\;\;\;-\left(-t\_4\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_5\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 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)) < -2.0000000000000001e300

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.7%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right) \]
                              7. Applied rewrites32.7%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right) \cdot y\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{t}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                              9. Applied rewrites32.7%

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

                              if -2.0000000000000001e300 < (+.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)) < -0.5

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                              10. Taylor expanded in z around inf

                                \[\leadsto --1 \cdot z \]
                              11. Step-by-step derivation
                                1. lower-*.f6416.0%

                                  \[\leadsto --1 \cdot z \]
                              12. Applied rewrites16.0%

                                \[\leadsto --1 \cdot z \]

                              if -0.5 < (+.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)) < 2e180 or 1.9999999999999999e305 < (+.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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.3%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              7. Applied rewrites32.3%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot y\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                              9. Applied rewrites32.3%

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

                              if 2e180 < (+.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.9999999999999999e305

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            3. Recombined 4 regimes into one program.
                            4. Add Preprocessing

                            Alternative 11: 55.1% accurate, 0.1× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{+300}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_5 \leq -0.5:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (let* ((t_1 (fmin (fmin z t) a))
                                    (t_2 (fmax (fmin z t) a))
                                    (t_3 (fmax (fmax z t) t_2))
                                    (t_4 (* (- (- i) (/ t_3 y)) (- y)))
                                    (t_5
                                     (+
                                      (+
                                       (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_2)) t_3)
                                       (* (- b 0.5) (log c)))
                                      (* y i))))
                               (if (<= t_5 -2e+300)
                                 (* i y)
                                 (if (<= t_5 -0.5)
                                   (- (* -1.0 t_1))
                                   (if (<= t_5 2e+180) t_4 (if (<= t_5 2e+305) (- (- t_3)) t_4))))))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmax(fmax(z, t), t_2);
                            	double t_4 = (-i - (t_3 / y)) * -y;
                            	double t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
                            	double tmp;
                            	if (t_5 <= -2e+300) {
                            		tmp = i * y;
                            	} else if (t_5 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_5 <= 2e+180) {
                            		tmp = t_4;
                            	} else if (t_5 <= 2e+305) {
                            		tmp = -(-t_3);
                            	} else {
                            		tmp = t_4;
                            	}
                            	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) :: t_2
                                real(8) :: t_3
                                real(8) :: t_4
                                real(8) :: t_5
                                real(8) :: tmp
                                t_1 = fmin(fmin(z, t), a)
                                t_2 = fmax(fmin(z, t), a)
                                t_3 = fmax(fmax(z, t), t_2)
                                t_4 = (-i - (t_3 / y)) * -y
                                t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)
                                if (t_5 <= (-2d+300)) then
                                    tmp = i * y
                                else if (t_5 <= (-0.5d0)) then
                                    tmp = -((-1.0d0) * t_1)
                                else if (t_5 <= 2d+180) then
                                    tmp = t_4
                                else if (t_5 <= 2d+305) then
                                    tmp = -(-t_3)
                                else
                                    tmp = t_4
                                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 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmax(fmax(z, t), t_2);
                            	double t_4 = (-i - (t_3 / y)) * -y;
                            	double t_5 = (((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i);
                            	double tmp;
                            	if (t_5 <= -2e+300) {
                            		tmp = i * y;
                            	} else if (t_5 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_5 <= 2e+180) {
                            		tmp = t_4;
                            	} else if (t_5 <= 2e+305) {
                            		tmp = -(-t_3);
                            	} else {
                            		tmp = t_4;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmax(fmax(z, t), t_2)
                            	t_4 = (-i - (t_3 / y)) * -y
                            	t_5 = (((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)
                            	tmp = 0
                            	if t_5 <= -2e+300:
                            		tmp = i * y
                            	elif t_5 <= -0.5:
                            		tmp = -(-1.0 * t_1)
                            	elif t_5 <= 2e+180:
                            		tmp = t_4
                            	elif t_5 <= 2e+305:
                            		tmp = -(-t_3)
                            	else:
                            		tmp = t_4
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmax(fmax(z, t), t_2)
                            	t_4 = Float64(Float64(Float64(-i) - Float64(t_3 / y)) * Float64(-y))
                            	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                            	tmp = 0.0
                            	if (t_5 <= -2e+300)
                            		tmp = Float64(i * y);
                            	elseif (t_5 <= -0.5)
                            		tmp = Float64(-Float64(-1.0 * t_1));
                            	elseif (t_5 <= 2e+180)
                            		tmp = t_4;
                            	elseif (t_5 <= 2e+305)
                            		tmp = Float64(-Float64(-t_3));
                            	else
                            		tmp = t_4;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	t_1 = min(min(z, t), a);
                            	t_2 = max(min(z, t), a);
                            	t_3 = max(max(z, t), t_2);
                            	t_4 = (-i - (t_3 / y)) * -y;
                            	t_5 = (((((x * log(y)) + t_1) + min(max(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
                            	tmp = 0.0;
                            	if (t_5 <= -2e+300)
                            		tmp = i * y;
                            	elseif (t_5 <= -0.5)
                            		tmp = -(-1.0 * t_1);
                            	elseif (t_5 <= 2e+180)
                            		tmp = t_4;
                            	elseif (t_5 <= 2e+305)
                            		tmp = -(-t_3);
                            	else
                            		tmp = t_4;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[((-i) - N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+300], N[(i * y), $MachinePrecision], If[LessEqual[t$95$5, -0.5], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 2e+180], t$95$4, If[LessEqual[t$95$5, 2e+305], (-(-t$95$3)), t$95$4]]]]]]]]]
                            
                            \begin{array}{l}
                            t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                            t_4 := \left(\left(-i\right) - \frac{t\_3}{y}\right) \cdot \left(-y\right)\\
                            t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                            \mathbf{if}\;t\_5 \leq -2 \cdot 10^{+300}:\\
                            \;\;\;\;i \cdot y\\
                            
                            \mathbf{elif}\;t\_5 \leq -0.5:\\
                            \;\;\;\;--1 \cdot t\_1\\
                            
                            \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+180}:\\
                            \;\;\;\;t\_4\\
                            
                            \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+305}:\\
                            \;\;\;\;-\left(-t\_3\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_4\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 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)) < -2.0000000000000001e300

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto i \cdot \color{blue}{y} \]
                              8. Applied rewrites24.1%

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

                              if -2.0000000000000001e300 < (+.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)) < -0.5

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                              10. Taylor expanded in z around inf

                                \[\leadsto --1 \cdot z \]
                              11. Step-by-step derivation
                                1. lower-*.f6416.0%

                                  \[\leadsto --1 \cdot z \]
                              12. Applied rewrites16.0%

                                \[\leadsto --1 \cdot z \]

                              if -0.5 < (+.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)) < 2e180 or 1.9999999999999999e305 < (+.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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f6432.3%

                                  \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              7. Applied rewrites32.3%

                                \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot y\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
                              9. Applied rewrites32.3%

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

                              if 2e180 < (+.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.9999999999999999e305

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            3. Recombined 4 regimes into one program.
                            4. Add Preprocessing

                            Alternative 12: 54.8% accurate, 0.2× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_4 \leq -2 \cdot 10^{+300}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_4 \leq -0.5:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;-\left(-t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (let* ((t_1 (fmin (fmin z t) a))
                                    (t_2 (fmax (fmin z t) a))
                                    (t_3 (fmax (fmax z t) t_2))
                                    (t_4
                                     (+
                                      (+
                                       (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_2)) t_3)
                                       (* (- b 0.5) (log c)))
                                      (* y i))))
                               (if (<= t_4 -2e+300)
                                 (* i y)
                                 (if (<= t_4 -0.5)
                                   (- (* -1.0 t_1))
                                   (if (<= t_4 2e+305) (- (- t_3)) (* i y))))))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmax(fmax(z, t), t_2);
                            	double t_4 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
                            	double tmp;
                            	if (t_4 <= -2e+300) {
                            		tmp = i * y;
                            	} else if (t_4 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_4 <= 2e+305) {
                            		tmp = -(-t_3);
                            	} 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) :: t_2
                                real(8) :: t_3
                                real(8) :: t_4
                                real(8) :: tmp
                                t_1 = fmin(fmin(z, t), a)
                                t_2 = fmax(fmin(z, t), a)
                                t_3 = fmax(fmax(z, t), t_2)
                                t_4 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)
                                if (t_4 <= (-2d+300)) then
                                    tmp = i * y
                                else if (t_4 <= (-0.5d0)) then
                                    tmp = -((-1.0d0) * t_1)
                                else if (t_4 <= 2d+305) then
                                    tmp = -(-t_3)
                                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 = fmin(fmin(z, t), a);
                            	double t_2 = fmax(fmin(z, t), a);
                            	double t_3 = fmax(fmax(z, t), t_2);
                            	double t_4 = (((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i);
                            	double tmp;
                            	if (t_4 <= -2e+300) {
                            		tmp = i * y;
                            	} else if (t_4 <= -0.5) {
                            		tmp = -(-1.0 * t_1);
                            	} else if (t_4 <= 2e+305) {
                            		tmp = -(-t_3);
                            	} else {
                            		tmp = i * y;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmax(fmax(z, t), t_2)
                            	t_4 = (((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)
                            	tmp = 0
                            	if t_4 <= -2e+300:
                            		tmp = i * y
                            	elif t_4 <= -0.5:
                            		tmp = -(-1.0 * t_1)
                            	elif t_4 <= 2e+305:
                            		tmp = -(-t_3)
                            	else:
                            		tmp = i * y
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	t_1 = fmin(fmin(z, t), a)
                            	t_2 = fmax(fmin(z, t), a)
                            	t_3 = fmax(fmax(z, t), t_2)
                            	t_4 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                            	tmp = 0.0
                            	if (t_4 <= -2e+300)
                            		tmp = Float64(i * y);
                            	elseif (t_4 <= -0.5)
                            		tmp = Float64(-Float64(-1.0 * t_1));
                            	elseif (t_4 <= 2e+305)
                            		tmp = Float64(-Float64(-t_3));
                            	else
                            		tmp = Float64(i * y);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	t_1 = min(min(z, t), a);
                            	t_2 = max(min(z, t), a);
                            	t_3 = max(max(z, t), t_2);
                            	t_4 = (((((x * log(y)) + t_1) + min(max(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i);
                            	tmp = 0.0;
                            	if (t_4 <= -2e+300)
                            		tmp = i * y;
                            	elseif (t_4 <= -0.5)
                            		tmp = -(-1.0 * t_1);
                            	elseif (t_4 <= 2e+305)
                            		tmp = -(-t_3);
                            	else
                            		tmp = i * y;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e+300], N[(i * y), $MachinePrecision], If[LessEqual[t$95$4, -0.5], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$4, 2e+305], (-(-t$95$3)), N[(i * y), $MachinePrecision]]]]]]]]
                            
                            \begin{array}{l}
                            t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                            t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                            t_4 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                            \mathbf{if}\;t\_4 \leq -2 \cdot 10^{+300}:\\
                            \;\;\;\;i \cdot y\\
                            
                            \mathbf{elif}\;t\_4 \leq -0.5:\\
                            \;\;\;\;--1 \cdot t\_1\\
                            
                            \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+305}:\\
                            \;\;\;\;-\left(-t\_3\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;i \cdot y\\
                            
                            
                            \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)) < -2.0000000000000001e300 or 1.9999999999999999e305 < (+.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. Step-by-step derivation
                                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto i \cdot \color{blue}{y} \]
                              8. Applied rewrites24.1%

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

                              if -2.0000000000000001e300 < (+.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)) < -0.5

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                              10. Taylor expanded in z around inf

                                \[\leadsto --1 \cdot z \]
                              11. Step-by-step derivation
                                1. lower-*.f6416.0%

                                  \[\leadsto --1 \cdot z \]
                              12. Applied rewrites16.0%

                                \[\leadsto --1 \cdot z \]

                              if -0.5 < (+.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.9999999999999999e305

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 13: 35.9% accurate, 2.0× speedup?

                            \[\begin{array}{l} t_1 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ \mathbf{if}\;t\_1 \leq 1.5 \cdot 10^{+130}:\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;-\left(-t\_1\right)\\ \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (let* ((t_1 (fmax t (fmax z a)))) (if (<= t_1 1.5e+130) (* i y) (- (- t_1)))))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmax(t, fmax(z, a));
                            	double tmp;
                            	if (t_1 <= 1.5e+130) {
                            		tmp = i * y;
                            	} else {
                            		tmp = -(-t_1);
                            	}
                            	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 = fmax(t, fmax(z, a))
                                if (t_1 <= 1.5d+130) then
                                    tmp = i * y
                                else
                                    tmp = -(-t_1)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double t_1 = fmax(t, fmax(z, a));
                            	double tmp;
                            	if (t_1 <= 1.5e+130) {
                            		tmp = i * y;
                            	} else {
                            		tmp = -(-t_1);
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	t_1 = fmax(t, fmax(z, a))
                            	tmp = 0
                            	if t_1 <= 1.5e+130:
                            		tmp = i * y
                            	else:
                            		tmp = -(-t_1)
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	t_1 = fmax(t, fmax(z, a))
                            	tmp = 0.0
                            	if (t_1 <= 1.5e+130)
                            		tmp = Float64(i * y);
                            	else
                            		tmp = Float64(-Float64(-t_1));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	t_1 = max(t, max(z, a));
                            	tmp = 0.0;
                            	if (t_1 <= 1.5e+130)
                            		tmp = i * y;
                            	else
                            		tmp = -(-t_1);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 1.5e+130], N[(i * y), $MachinePrecision], (-(-t$95$1))]]
                            
                            \begin{array}{l}
                            t_1 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
                            \mathbf{if}\;t\_1 \leq 1.5 \cdot 10^{+130}:\\
                            \;\;\;\;i \cdot y\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;-\left(-t\_1\right)\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < 1.5e130

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto i \cdot \color{blue}{y} \]
                              8. Applied rewrites24.1%

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

                              if 1.5e130 < a

                              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 y around -inf

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6416.4%

                                  \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                              7. Applied rewrites16.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                                3. lower-neg.f6416.4%

                                  \[\leadsto --1 \cdot a \]
                                4. lift-*.f64N/A

                                  \[\leadsto --1 \cdot a \]
                                5. mul-1-negN/A

                                  \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                                6. lift-neg.f6416.4%

                                  \[\leadsto -\left(-a\right) \]
                              9. Applied rewrites16.4%

                                \[\leadsto \color{blue}{-\left(-a\right)} \]
                            3. Recombined 2 regimes into one program.
                            4. Add Preprocessing

                            Alternative 14: 22.9% accurate, 4.2× speedup?

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                            6. Step-by-step derivation
                              1. lower-*.f6416.4%

                                \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                            7. Applied rewrites16.4%

                              \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                            8. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                              2. mul-1-negN/A

                                \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                              3. lower-neg.f6416.4%

                                \[\leadsto --1 \cdot a \]
                              4. lift-*.f64N/A

                                \[\leadsto --1 \cdot a \]
                              5. mul-1-negN/A

                                \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                              6. lift-neg.f6416.4%

                                \[\leadsto -\left(-a\right) \]
                            9. Applied rewrites16.4%

                              \[\leadsto \color{blue}{-\left(-a\right)} \]
                            10. Add Preprocessing

                            Reproduce

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