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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\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(b - 0.5, \log c, \mathsf{fma}\left(i, y, \mathsf{max}\left(z, a\right) + \mathsf{fma}\left(\log y, x, \mathsf{min}\left(z, a\right)\right)\right) + t\right) \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma
  (- b 0.5)
  (log c)
  (+ (fma i y (+ (fmax z a) (fma (log y) x (fmin z a)))) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma((b - 0.5), log(c), (fma(i, y, (fmax(z, a) + fma(log(y), x, fmin(z, a)))) + t));
}
function code(x, y, z, t, a, b, c, i)
	return fma(Float64(b - 0.5), log(c), Float64(fma(i, y, Float64(fmax(z, a) + fma(log(y), x, fmin(z, a)))) + t))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(i * y + N[(N[Max[z, a], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[Min[z, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, \mathsf{max}\left(z, a\right) + \mathsf{fma}\left(\log y, x, \mathsf{min}\left(z, a\right)\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. 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 \]
    3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 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, t\right)\right)\right) + a\right) + \mathsf{max}\left(z, t\right)\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 t))) a) (fmax z 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, t))) + a) + fmax(z, 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, t))) + a) + fmax(z, 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, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + N[Max[z, t], $MachinePrecision]), $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, t\right)\right)\right) + a\right) + \mathsf{max}\left(z, t\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. 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 3: 99.2% accurate, 0.7× speedup?

\[\mathsf{max}\left(\mathsf{max}\left(z, t\right), \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\right) + \left(\mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right) + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+
  (fmax (fmax z t) (fmax (fmin z t) a))
  (+ (fmin (fmin z t) a) (fma i y (fma x (log y) (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fmax(fmax(z, t), fmax(fmin(z, t), a)) + (fmin(fmin(z, t), a) + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5)))));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(fmax(fmax(z, t), fmax(fmin(z, t), a)) + Float64(fmin(fmin(z, t), a) + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5))))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[Max[N[Max[z, t], $MachinePrecision], N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]], $MachinePrecision] + N[(N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision] + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\mathsf{max}\left(\mathsf{max}\left(z, t\right), \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\right) + \left(\mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right) + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\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 t around 0

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

      \[\leadsto a + \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 a + \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 a + \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 a + \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 a + \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 a + \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 a + \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--.f6485.1

      \[\leadsto a + \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 rewrites85.1%

    \[\leadsto \color{blue}{a + \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. Add Preprocessing

Alternative 4: 92.9% accurate, 1.0× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.9999999999999999e169 or 5.9999999999999998e172 < 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 \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 \]
      3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999999e169 < x < 5.9999999999999998e172

    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 \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 \]
      3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 90.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.9999999999999999e169 < x < 2.9000000000000002e241

      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 \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 \]
        3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 90.2% accurate, 1.0× speedup?

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

            \[\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.7%

          \[\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 y around 0

          \[\leadsto t + \color{blue}{\left(z + \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(z + \color{blue}{\left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right) \]
          2. lower-+.f64N/A

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

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

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

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

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

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

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

        if -8.9999999999999999e169 < x < 1.49999999999999992e243

        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 \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 \]
          3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 87.1% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x \cdot \color{blue}{\log y} \]
              2. lower-log.f6416.8

                \[\leadsto x \cdot \log y \]
            6. Applied rewrites16.8%

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

            if -8.9999999999999999e169 < x < 1.49999999999999992e243

            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 \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 \]
              3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 87.1% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x \cdot \color{blue}{\log y} \]
                  2. lower-log.f6416.8

                    \[\leadsto x \cdot \log y \]
                6. Applied rewrites16.8%

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

                if -8.9999999999999999e169 < x < 1.49999999999999992e243

                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 \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 \]
                  3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 79.6% accurate, 1.1× speedup?

                \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq 2.15 \cdot 10^{+125}:\\ \;\;\;\;\mathsf{min}\left(t, a\right) + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, \mathsf{max}\left(t, a\right) + z\right)\right) + \mathsf{min}\left(t, a\right)\\ \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (if (<= (fmax t a) 2.15e+125)
                   (+ (fmin t a) (+ z (fma i y (* (log c) (- b 0.5)))))
                   (+ (fma -0.5 (log c) (fma i y (+ (fmax t a) z))) (fmin t a))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double tmp;
                	if (fmax(t, a) <= 2.15e+125) {
                		tmp = fmin(t, a) + (z + fma(i, y, (log(c) * (b - 0.5))));
                	} else {
                		tmp = fma(-0.5, log(c), fma(i, y, (fmax(t, a) + z))) + fmin(t, a);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	tmp = 0.0
                	if (fmax(t, a) <= 2.15e+125)
                		tmp = Float64(fmin(t, a) + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))));
                	else
                		tmp = Float64(fma(-0.5, log(c), fma(i, y, Float64(fmax(t, a) + z))) + fmin(t, a));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[Max[t, a], $MachinePrecision], 2.15e+125], N[(N[Min[t, a], $MachinePrecision] + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[Log[c], $MachinePrecision] + N[(i * y + N[(N[Max[t, a], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Min[t, a], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq 2.15 \cdot 10^{+125}:\\
                \;\;\;\;\mathsf{min}\left(t, a\right) + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, \mathsf{max}\left(t, a\right) + z\right)\right) + \mathsf{min}\left(t, a\right)\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 2.15000000000000018e125

                  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.7

                      \[\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.7%

                    \[\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.2

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

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

                  if 2.15000000000000018e125 < 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. 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 \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 \]
                    3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 75.7% accurate, 0.7× speedup?

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

                      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 \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 \]
                        3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                      8. Step-by-step derivation
                        1. lower-+.f6461.5

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

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

                      if -1e71 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.9999999999999996e227

                      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 \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 \]
                        3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 72.6% accurate, 0.4× speedup?

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

                              \[\leadsto \left(\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) + y \cdot i \]
                            6. associate-+l+N/A

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

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

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

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

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

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

                                \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                              2. lift-*.f64N/A

                                \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                              3. *-commutativeN/A

                                \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                              4. +-commutativeN/A

                                \[\leadsto \color{blue}{i \cdot y + 1 \cdot t} \]
                              5. sum-to-multN/A

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

                                \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{i \cdot y}\right) \cdot \left(i \cdot y\right)} \]
                              7. lower-unsound-+.f64N/A

                                \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{i \cdot y}\right)} \cdot \left(i \cdot y\right) \]
                              8. lower-unsound-/.f64N/A

                                \[\leadsto \left(1 + \color{blue}{\frac{1 \cdot t}{i \cdot y}}\right) \cdot \left(i \cdot y\right) \]
                              9. *-commutativeN/A

                                \[\leadsto \left(1 + \frac{1 \cdot t}{\color{blue}{y \cdot i}}\right) \cdot \left(i \cdot y\right) \]
                              10. lift-*.f64N/A

                                \[\leadsto \left(1 + \frac{1 \cdot t}{\color{blue}{y \cdot i}}\right) \cdot \left(i \cdot y\right) \]
                              11. *-commutativeN/A

                                \[\leadsto \left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \color{blue}{\left(y \cdot i\right)} \]
                              12. lift-*.f6431.7

                                \[\leadsto \left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \color{blue}{\left(y \cdot i\right)} \]
                            3. Applied rewrites31.7%

                              \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \left(y \cdot i\right)} \]
                            4. Taylor expanded in y around inf

                              \[\leadsto \color{blue}{1} \cdot \left(y \cdot i\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites24.2%

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

                              if -inf.0 < (+.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.00000000000000003e306

                              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 \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 \]
                                3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                              8. Step-by-step derivation
                                1. lower-+.f6461.5

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

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

                            Alternative 12: 49.3% accurate, 0.3× 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)\\ \mathbf{if}\;\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 \leq -1 \cdot 10^{+36}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_1}{t\_3}, t\_3, y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_4}{t\_3}, t\_3, y \cdot i\right)\\ \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)))
                               (if (<=
                                    (+
                                     (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                                     (* y i))
                                    -1e+36)
                                 (fma (/ t_1 t_3) t_3 (* y i))
                                 (fma (/ t_4 t_3) t_3 (* y i)))))
                            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 tmp;
                            	if (((((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i)) <= -1e+36) {
                            		tmp = fma((t_1 / t_3), t_3, (y * i));
                            	} else {
                            		tmp = fma((t_4 / t_3), t_3, (y * i));
                            	}
                            	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)
                            	tmp = 0.0
                            	if (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)) <= -1e+36)
                            		tmp = fma(Float64(t_1 / t_3), t_3, Float64(y * i));
                            	else
                            		tmp = fma(Float64(t_4 / t_3), t_3, Float64(y * i));
                            	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[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]}, If[LessEqual[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], -1e+36], N[(N[(t$95$1 / t$95$3), $MachinePrecision] * t$95$3 + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$4 / t$95$3), $MachinePrecision] * t$95$3 + N[(y * i), $MachinePrecision]), $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{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)\\
                            \mathbf{if}\;\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 \leq -1 \cdot 10^{+36}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{t\_1}{t\_3}, t\_3, y \cdot i\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{t\_4}{t\_3}, t\_3, y \cdot i\right)\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1.00000000000000004e36

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

                                  \[\leadsto \left(\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) + y \cdot i \]
                                6. associate-+l+N/A

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                  2. lift-*.f64N/A

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

                                    \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                  4. *-commutativeN/A

                                    \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                  5. lower-fma.f64N/A

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

                                    \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                  7. lift-*.f6437.7

                                    \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                3. Applied rewrites37.7%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, y \cdot i\right)} \]
                                4. Taylor expanded in z around inf

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

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

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

                                if -1.00000000000000004e36 < (+.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. +-commutativeN/A

                                    \[\leadsto \left(\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) + y \cdot i \]
                                  6. associate-+l+N/A

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                    2. lift-*.f64N/A

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

                                      \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                    4. *-commutativeN/A

                                      \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                    5. lower-fma.f64N/A

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

                                      \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                    7. lift-*.f6437.7

                                      \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                  3. Applied rewrites37.7%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, y \cdot i\right)} \]
                                  4. Taylor expanded in a around inf

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{a}{t}}, t, y \cdot i\right) \]
                                  5. Step-by-step derivation
                                    1. lower-/.f6432.2

                                      \[\leadsto \mathsf{fma}\left(\frac{a}{\color{blue}{t}}, t, y \cdot i\right) \]
                                  6. Applied rewrites32.2%

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{a}{t}}, t, y \cdot i\right) \]
                                6. Recombined 2 regimes into one program.
                                7. Add Preprocessing

                                Alternative 13: 44.2% accurate, 0.6× speedup?

                                \[\begin{array}{l} t_1 := b \cdot \log c\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), a\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{max}\left(\mathsf{max}\left(z, t\right), a\right)}{t\_3}, t\_3, y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (let* ((t_1 (* b (log c)))
                                        (t_2 (* (- b 0.5) (log c)))
                                        (t_3 (fmin (fmax z t) a)))
                                   (if (<= t_2 -1e+71)
                                     t_1
                                     (if (<= t_2 5e+227) (fma (/ (fmax (fmax z t) a) t_3) t_3 (* y i)) 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 t_2 = (b - 0.5) * log(c);
                                	double t_3 = fmin(fmax(z, t), a);
                                	double tmp;
                                	if (t_2 <= -1e+71) {
                                		tmp = t_1;
                                	} else if (t_2 <= 5e+227) {
                                		tmp = fma((fmax(fmax(z, t), a) / t_3), t_3, (y * i));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b, c, i)
                                	t_1 = Float64(b * log(c))
                                	t_2 = Float64(Float64(b - 0.5) * log(c))
                                	t_3 = fmin(fmax(z, t), a)
                                	tmp = 0.0
                                	if (t_2 <= -1e+71)
                                		tmp = t_1;
                                	elseif (t_2 <= 5e+227)
                                		tmp = fma(Float64(fmax(fmax(z, t), a) / t_3), t_3, Float64(y * i));
                                	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]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], a], $MachinePrecision]}, If[LessEqual[t$95$2, -1e+71], t$95$1, If[LessEqual[t$95$2, 5e+227], N[(N[(N[Max[N[Max[z, t], $MachinePrecision], a], $MachinePrecision] / t$95$3), $MachinePrecision] * t$95$3 + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                
                                \begin{array}{l}
                                t_1 := b \cdot \log c\\
                                t_2 := \left(b - 0.5\right) \cdot \log c\\
                                t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), a\right)\\
                                \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+71}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\
                                \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{max}\left(\mathsf{max}\left(z, t\right), a\right)}{t\_3}, t\_3, y \cdot i\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -1e71 or 4.9999999999999996e227 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

                                  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.6

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

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

                                  if -1e71 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.9999999999999996e227

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

                                      \[\leadsto \left(\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) + y \cdot i \]
                                    6. associate-+l+N/A

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                      2. lift-*.f64N/A

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

                                        \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                      4. *-commutativeN/A

                                        \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                      5. lower-fma.f64N/A

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

                                        \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                      7. lift-*.f6437.7

                                        \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                    3. Applied rewrites37.7%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, y \cdot i\right)} \]
                                    4. Taylor expanded in a around inf

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{a}{t}}, t, y \cdot i\right) \]
                                    5. Step-by-step derivation
                                      1. lower-/.f6432.2

                                        \[\leadsto \mathsf{fma}\left(\frac{a}{\color{blue}{t}}, t, y \cdot i\right) \]
                                    6. Applied rewrites32.2%

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{a}{t}}, t, y \cdot i\right) \]
                                  6. Recombined 2 regimes into one program.
                                  7. Add Preprocessing

                                  Alternative 14: 40.1% accurate, 2.2× speedup?

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

                                        \[\leadsto \left(\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) + y \cdot i \]
                                      6. associate-+l+N/A

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                        2. lift-*.f64N/A

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

                                          \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                        4. *-commutativeN/A

                                          \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                        5. lower-fma.f64N/A

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

                                          \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                        7. lift-*.f6437.7

                                          \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                      3. Applied rewrites37.7%

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

                                      if -1.15e20 < i < 7.2e-46

                                      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.6

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

                                        \[\leadsto \color{blue}{b \cdot \log c} \]
                                    6. Recombined 2 regimes into one program.
                                    7. Add Preprocessing

                                    Alternative 15: 38.3% accurate, 1.9× speedup?

                                    \[\begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -9 \cdot 10^{+169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+243}:\\ \;\;\;\;\mathsf{fma}\left(1, \mathsf{min}\left(t, a\right), y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                    (FPCore (x y z t a b c i)
                                     :precision binary64
                                     (let* ((t_1 (* x (log y))))
                                       (if (<= x -9e+169)
                                         t_1
                                         (if (<= x 1.5e+243) (fma 1.0 (fmin t a) (* y i)) t_1))))
                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                    	double t_1 = x * log(y);
                                    	double tmp;
                                    	if (x <= -9e+169) {
                                    		tmp = t_1;
                                    	} else if (x <= 1.5e+243) {
                                    		tmp = fma(1.0, fmin(t, a), (y * i));
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	t_1 = Float64(x * log(y))
                                    	tmp = 0.0
                                    	if (x <= -9e+169)
                                    		tmp = t_1;
                                    	elseif (x <= 1.5e+243)
                                    		tmp = fma(1.0, fmin(t, a), Float64(y * i));
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+169], t$95$1, If[LessEqual[x, 1.5e+243], N[(1.0 * N[Min[t, a], $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    t_1 := x \cdot \log y\\
                                    \mathbf{if}\;x \leq -9 \cdot 10^{+169}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;x \leq 1.5 \cdot 10^{+243}:\\
                                    \;\;\;\;\mathsf{fma}\left(1, \mathsf{min}\left(t, a\right), y \cdot i\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x < -8.9999999999999999e169 or 1.49999999999999992e243 < 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 \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 \]
                                        3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto x \cdot \color{blue}{\log y} \]
                                          2. lower-log.f6416.8

                                            \[\leadsto x \cdot \log y \]
                                        6. Applied rewrites16.8%

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

                                        if -8.9999999999999999e169 < x < 1.49999999999999992e243

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

                                            \[\leadsto \left(\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) + y \cdot i \]
                                          6. associate-+l+N/A

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                            2. lift-*.f64N/A

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

                                              \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                            4. *-commutativeN/A

                                              \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                            5. lower-fma.f64N/A

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

                                              \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                            7. lift-*.f6437.7

                                              \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                          3. Applied rewrites37.7%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, y \cdot i\right)} \]
                                        6. Recombined 2 regimes into one program.
                                        7. Add Preprocessing

                                        Alternative 16: 37.0% accurate, 3.1× speedup?

                                        \[\mathsf{fma}\left(1, \mathsf{min}\left(t, a\right), y \cdot i\right) \]
                                        (FPCore (x y z t a b c i) :precision binary64 (fma 1.0 (fmin t a) (* y i)))
                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	return fma(1.0, fmin(t, a), (y * i));
                                        }
                                        
                                        function code(x, y, z, t, a, b, c, i)
                                        	return fma(1.0, fmin(t, a), Float64(y * i))
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(1.0 * N[Min[t, a], $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
                                        
                                        \mathsf{fma}\left(1, \mathsf{min}\left(t, a\right), y \cdot i\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. 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. +-commutativeN/A

                                            \[\leadsto \left(\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) + y \cdot i \]
                                          6. associate-+l+N/A

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                            2. lift-*.f64N/A

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

                                              \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                            4. *-commutativeN/A

                                              \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                            5. lower-fma.f64N/A

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

                                              \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                            7. lift-*.f6437.7

                                              \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{y \cdot i}\right) \]
                                          3. Applied rewrites37.7%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, y \cdot i\right)} \]
                                          4. Add Preprocessing

                                          Alternative 17: 24.2% accurate, 5.4× speedup?

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

                                              \[\leadsto \left(\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) + y \cdot i \]
                                            6. associate-+l+N/A

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{1 \cdot t + y \cdot i} \]
                                              2. lift-*.f64N/A

                                                \[\leadsto 1 \cdot t + \color{blue}{y \cdot i} \]
                                              3. *-commutativeN/A

                                                \[\leadsto 1 \cdot t + \color{blue}{i \cdot y} \]
                                              4. +-commutativeN/A

                                                \[\leadsto \color{blue}{i \cdot y + 1 \cdot t} \]
                                              5. sum-to-multN/A

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

                                                \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{i \cdot y}\right) \cdot \left(i \cdot y\right)} \]
                                              7. lower-unsound-+.f64N/A

                                                \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{i \cdot y}\right)} \cdot \left(i \cdot y\right) \]
                                              8. lower-unsound-/.f64N/A

                                                \[\leadsto \left(1 + \color{blue}{\frac{1 \cdot t}{i \cdot y}}\right) \cdot \left(i \cdot y\right) \]
                                              9. *-commutativeN/A

                                                \[\leadsto \left(1 + \frac{1 \cdot t}{\color{blue}{y \cdot i}}\right) \cdot \left(i \cdot y\right) \]
                                              10. lift-*.f64N/A

                                                \[\leadsto \left(1 + \frac{1 \cdot t}{\color{blue}{y \cdot i}}\right) \cdot \left(i \cdot y\right) \]
                                              11. *-commutativeN/A

                                                \[\leadsto \left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \color{blue}{\left(y \cdot i\right)} \]
                                              12. lift-*.f6431.7

                                                \[\leadsto \left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \color{blue}{\left(y \cdot i\right)} \]
                                            3. Applied rewrites31.7%

                                              \[\leadsto \color{blue}{\left(1 + \frac{1 \cdot t}{y \cdot i}\right) \cdot \left(y \cdot i\right)} \]
                                            4. Taylor expanded in y around inf

                                              \[\leadsto \color{blue}{1} \cdot \left(y \cdot i\right) \]
                                            5. Step-by-step derivation
                                              1. Applied rewrites24.2%

                                                \[\leadsto \color{blue}{1} \cdot \left(y \cdot i\right) \]
                                              2. Add Preprocessing

                                              Reproduce

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