
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma (- b 0.5) (log c) (+ (fma i y (+ a (fma (log y) x z))) 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, (a + fma(log(y), x, z))) + t));
}
function code(x, y, z, t, a, b, c, i) return fma(Float64(b - 0.5), log(c), Float64(fma(i, y, Float64(a + fma(log(y), x, z))) + 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[(a + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\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)
\end{array}
Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a b c i) :precision binary64 (fma y i (+ (+ (fma (log c) (- b 0.5) (fma (log y) x z)) a) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, ((fma(log(c), (b - 0.5), fma(log(y), x, z)) + a) + t));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), fma(log(y), x, z)) + a) + t)) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\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)
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (fma i y (+ (fma (log c) (- b 0.5) (fma (log y) x t)) z)) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(i, y, (fma(log(c), (b - 0.5), fma(log(y), x, t)) + z)) + a;
}
function code(x, y, z, t, a, b, c, i) return Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), fma(log(y), x, t)) + z)) + a) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + t), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right) + z\right) + a
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ z (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 a + (z + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5)))));
}
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(z + 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[(a + N[(z + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
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)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6485.1
Applied rewrites85.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.95e+93) (+ (fma (log c) (- b 0.5) (fma y i (+ z a))) 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) {
double tmp;
if (z <= -2.95e+93) {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
} else {
tmp = a + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.95e+93) tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(z + a))) + t); else tmp = Float64(a + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.95e+93], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if z < -2.95000000000000004e93Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
if -2.95000000000000004e93 < z Initial program 99.8%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6485.1
Applied rewrites85.1%
Taylor expanded in z around 0
lower-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6470.5
Applied rewrites70.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 6.4e+15) (fma (- b 0.5) (log c) (+ a (fma (log y) x (+ t z)))) (+ (fma (log c) (- b 0.5) (fma y i (+ z a))) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 6.4e+15) {
tmp = fma((b - 0.5), log(c), (a + fma(log(y), x, (t + z))));
} else {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 6.4e+15) tmp = fma(Float64(b - 0.5), log(c), Float64(a + fma(log(y), x, Float64(t + z)))); else tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(z + a))) + t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 6.4e+15], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(N[Log[y], $MachinePrecision] * x + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.4 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \mathsf{fma}\left(\log y, x, t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\end{array}
\end{array}
if y < 6.4e15Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
lift-+.f64N/A
lift-+.f64N/A
associate-+r+N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6476.7
Applied rewrites76.7%
if 6.4e15 < y Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 6.4e+15) (+ a (+ z (fma x (log y) (* (log c) (- b 0.5))))) (+ (fma (log c) (- b 0.5) (fma y i (+ z a))) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 6.4e+15) {
tmp = a + (z + fma(x, log(y), (log(c) * (b - 0.5))));
} else {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 6.4e+15) tmp = Float64(a + Float64(z + fma(x, log(y), Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(z + a))) + t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 6.4e+15], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.4 \cdot 10^{+15}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\end{array}
\end{array}
if y < 6.4e15Initial program 99.8%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6485.1
Applied rewrites85.1%
Taylor expanded in y around 0
lower-+.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6462.1
Applied rewrites62.1%
if 6.4e15 < y Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.55e+211)
(fma -0.5 (log c) (+ a (fma (log y) x (+ t z))))
(if (<= x 3.5e+202)
(+ (fma (log c) (- b 0.5) (fma y i (+ z a))) t)
(fma (/ (* (log y) x) a) a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.55e+211) {
tmp = fma(-0.5, log(c), (a + fma(log(y), x, (t + z))));
} else if (x <= 3.5e+202) {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
} else {
tmp = fma(((log(y) * x) / a), a, (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.55e+211) tmp = fma(-0.5, log(c), Float64(a + fma(log(y), x, Float64(t + z)))); elseif (x <= 3.5e+202) tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(z + a))) + t); else tmp = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.55e+211], N[(-0.5 * N[Log[c], $MachinePrecision] + N[(a + N[(N[Log[y], $MachinePrecision] * x + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+202], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+211}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log c, a + \mathsf{fma}\left(\log y, x, t + z\right)\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\end{array}
\end{array}
if x < -1.5500000000000001e211Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
lift-+.f64N/A
lift-+.f64N/A
associate-+r+N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6476.7
Applied rewrites76.7%
Taylor expanded in b around 0
Applied rewrites61.0%
if -1.5500000000000001e211 < x < 3.49999999999999987e202Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
if 3.49999999999999987e202 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -6.2e+218)
(fma (- b 0.5) (log c) (+ a (fma (log y) x t)))
(if (<= x 3.5e+202)
(+ (fma (log c) (- b 0.5) (fma y i (+ z a))) t)
(fma (/ (* (log y) x) a) a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -6.2e+218) {
tmp = fma((b - 0.5), log(c), (a + fma(log(y), x, t)));
} else if (x <= 3.5e+202) {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
} else {
tmp = fma(((log(y) * x) / a), a, (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -6.2e+218) tmp = fma(Float64(b - 0.5), log(c), Float64(a + fma(log(y), x, t))); elseif (x <= 3.5e+202) tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(z + a))) + t); else tmp = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -6.2e+218], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(N[Log[y], $MachinePrecision] * x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+202], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+218}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \mathsf{fma}\left(\log y, x, t\right)\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\end{array}
\end{array}
if x < -6.2000000000000003e218Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
lift-+.f64N/A
lift-+.f64N/A
associate-+r+N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6476.7
Applied rewrites76.7%
Taylor expanded in z around 0
Applied rewrites62.0%
if -6.2000000000000003e218 < x < 3.49999999999999987e202Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
if 3.49999999999999987e202 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (/ (* (log y) x) a) a (* y i))))
(if (<= x -3.05e+212)
t_1
(if (<= x 3.5e+202)
(+ (fma (log c) (- b 0.5) (fma y i (+ 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(((log(y) * x) / a), a, (y * i));
double tmp;
if (x <= -3.05e+212) {
tmp = t_1;
} else if (x <= 3.5e+202) {
tmp = fma(log(c), (b - 0.5), fma(y, i, (z + a))) + t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)) tmp = 0.0 if (x <= -3.05e+212) tmp = t_1; elseif (x <= 3.5e+202) tmp = Float64(fma(log(c), Float64(b - 0.5), fma(y, i, Float64(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[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.05e+212], t$95$1, If[LessEqual[x, 3.5e+202], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.0499999999999999e212 or 3.49999999999999987e202 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
if -3.0499999999999999e212 < x < 3.49999999999999987e202Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (/ (* (log y) x) a) a (* y i))))
(if (<= x -3.05e+212)
t_1
(if (<= x 3.5e+202)
(+ (fma i y (+ (fma (log c) (- b 0.5) t) z)) a)
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(((log(y) * x) / a), a, (y * i));
double tmp;
if (x <= -3.05e+212) {
tmp = t_1;
} else if (x <= 3.5e+202) {
tmp = fma(i, y, (fma(log(c), (b - 0.5), t) + z)) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)) tmp = 0.0 if (x <= -3.05e+212) tmp = t_1; elseif (x <= 3.5e+202) tmp = Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), t) + z)) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.05e+212], t$95$1, If[LessEqual[x, 3.5e+202], N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.0499999999999999e212 or 3.49999999999999987e202 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
if -3.0499999999999999e212 < x < 3.49999999999999987e202Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (/ (* (log y) x) a) a (* y i))))
(if (<= x -3.05e+212)
t_1
(if (<= x 3.5e+202) (+ a (+ z (fma i y (* (log c) (- b 0.5))))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(((log(y) * x) / a), a, (y * i));
double tmp;
if (x <= -3.05e+212) {
tmp = t_1;
} else if (x <= 3.5e+202) {
tmp = a + (z + fma(i, y, (log(c) * (b - 0.5))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)) tmp = 0.0 if (x <= -3.05e+212) tmp = t_1; elseif (x <= 3.5e+202) tmp = Float64(a + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.05e+212], t$95$1, If[LessEqual[x, 3.5e+202], N[(a + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+202}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.0499999999999999e212 or 3.49999999999999987e202 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
if -3.0499999999999999e212 < x < 3.49999999999999987e202Initial program 99.8%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f6485.1
Applied rewrites85.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-log.f64N/A
lower--.f6469.8
Applied rewrites69.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.36e-11) (fma (- b 0.5) (log c) (+ a (+ t z))) (+ (fma (log c) -0.5 (fma y i (+ z a))) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.36e-11) {
tmp = fma((b - 0.5), log(c), (a + (t + z)));
} else {
tmp = fma(log(c), -0.5, fma(y, i, (z + a))) + t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.36e-11) tmp = fma(Float64(b - 0.5), log(c), Float64(a + Float64(t + z))); else tmp = Float64(fma(log(c), -0.5, fma(y, i, Float64(z + a))) + t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.36e-11], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * -0.5 + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.36 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \left(t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, -0.5, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
\end{array}
\end{array}
if y < 1.36e-11Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
Taylor expanded in x around 0
lower-+.f6461.3
Applied rewrites61.3%
if 1.36e-11 < y Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites84.3%
lift-fma.f64N/A
lift-+.f64N/A
associate-+r+N/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6484.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
Taylor expanded in b around 0
Applied rewrites68.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 -5e+307)
(fma y i (/ (* (* a (log y)) x) a))
(if (<= t_1 4e+306)
(fma (- b 0.5) (log c) (+ a (+ t z)))
(fma (/ (* (log y) x) a) a (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -5e+307) {
tmp = fma(y, i, (((a * log(y)) * x) / a));
} else if (t_1 <= 4e+306) {
tmp = fma((b - 0.5), log(c), (a + (t + z)));
} else {
tmp = fma(((log(y) * x) / a), a, (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= -5e+307) tmp = fma(y, i, Float64(Float64(Float64(a * log(y)) * x) / a)); elseif (t_1 <= 4e+306) tmp = fma(Float64(b - 0.5), log(c), Float64(a + Float64(t + z))); else tmp = fma(Float64(Float64(log(y) * x) / a), a, Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+307], N[(y * i + N[(N[(N[(a * N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+306], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] * a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot x}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \left(t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right)\\
\end{array}
\end{array}
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)) < -5e307Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites69.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-log.f6434.5
Applied rewrites34.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6434.5
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6434.4
Applied rewrites34.4%
if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 4.00000000000000007e306Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
Taylor expanded in x around 0
lower-+.f6461.3
Applied rewrites61.3%
if 4.00000000000000007e306 < (+.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)) Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower-log.f6432.0
Applied rewrites32.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6432.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 -5e+307)
(fma y i (/ (* (* a (log y)) x) a))
(if (<= t_1 1e+293)
(fma (- b 0.5) (log c) (+ a (+ t z)))
(fma y i (* 1.0 a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -5e+307) {
tmp = fma(y, i, (((a * log(y)) * x) / a));
} else if (t_1 <= 1e+293) {
tmp = fma((b - 0.5), log(c), (a + (t + z)));
} else {
tmp = fma(y, i, (1.0 * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= -5e+307) tmp = fma(y, i, Float64(Float64(Float64(a * log(y)) * x) / a)); elseif (t_1 <= 1e+293) tmp = fma(Float64(b - 0.5), log(c), Float64(a + Float64(t + z))); else tmp = fma(y, i, Float64(1.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+307], N[(y * i + N[(N[(N[(a * N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+293], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot x}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+293}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \left(t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\end{array}
\end{array}
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)) < -5e307Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites69.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-log.f6434.5
Applied rewrites34.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6434.5
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6434.4
Applied rewrites34.4%
if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.9999999999999992e292Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
Taylor expanded in x around 0
lower-+.f6461.3
Applied rewrites61.3%
if 9.9999999999999992e292 < (+.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)) Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 22500000000000.0) (fma (- b 0.5) (log c) (+ a (+ t z))) (fma y i (* 1.0 a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 22500000000000.0) {
tmp = fma((b - 0.5), log(c), (a + (t + z)));
} else {
tmp = fma(y, i, (1.0 * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 22500000000000.0) tmp = fma(Float64(b - 0.5), log(c), Float64(a + Float64(t + z))); else tmp = fma(y, i, Float64(1.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 22500000000000.0], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 22500000000000:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a + \left(t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\end{array}
\end{array}
if y < 2.25e13Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f6476.7
Applied rewrites76.7%
Taylor expanded in x around 0
lower-+.f6461.3
Applied rewrites61.3%
if 2.25e13 < y Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-40.0)
(fma y i (/ (* a z) a))
(fma y i (* 1.0 a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -40.0) {
tmp = fma(y, i, ((a * z) / a));
} else {
tmp = fma(y, i, (1.0 * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -40.0) tmp = fma(y, i, Float64(Float64(a * z) / a)); else tmp = fma(y, i, Float64(1.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -40.0], N[(y * i + N[(N[(a * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -40:\\
\;\;\;\;\mathsf{fma}\left(y, i, \frac{a \cdot z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\end{array}
\end{array}
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)) < -40Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites69.8%
Taylor expanded in z around inf
lower-*.f6433.9
Applied rewrites33.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6433.9
Applied rewrites33.9%
if -40 < (+.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)) Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-40.0)
(fma y i (* (/ z a) a))
(fma y i (* 1.0 a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -40.0) {
tmp = fma(y, i, ((z / a) * a));
} else {
tmp = fma(y, i, (1.0 * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -40.0) tmp = fma(y, i, Float64(Float64(z / a) * a)); else tmp = fma(y, i, Float64(1.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -40.0], N[(y * i + N[(N[(z / a), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -40:\\
\;\;\;\;\mathsf{fma}\left(y, i, \frac{z}{a} \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\end{array}
\end{array}
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)) < -40Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
Taylor expanded in z around inf
lower-/.f6431.5
Applied rewrites31.5%
if -40 < (+.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)) Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* b (log c)))) (if (<= b -9e+232) t_1 (if (<= b 4.8e+172) (fma y i (* 1.0 a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if (b <= -9e+232) {
tmp = t_1;
} else if (b <= 4.8e+172) {
tmp = fma(y, i, (1.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (b <= -9e+232) tmp = t_1; elseif (b <= 4.8e+172) tmp = fma(y, i, Float64(1.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e+232], t$95$1, If[LessEqual[b, 4.8e+172], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b \leq -9 \cdot 10^{+232}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{+172}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.9999999999999995e232 or 4.8000000000000001e172 < b Initial program 99.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-log.f6416.9
Applied rewrites16.9%
if -8.9999999999999995e232 < b < 4.8000000000000001e172Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x -1.8e+153) (* x (log y)) (fma y i (* 1.0 a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.8e+153) {
tmp = x * log(y);
} else {
tmp = fma(y, i, (1.0 * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.8e+153) tmp = Float64(x * log(y)); else tmp = fma(y, i, Float64(1.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.8e+153], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot a\right)\\
\end{array}
\end{array}
if x < -1.8e153Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-+r+N/A
associate-+r+N/A
lower-+.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6416.6
Applied rewrites16.6%
if -1.8e153 < x Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i) :precision binary64 (fma y i (* 1.0 a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, (1.0 * a));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, Float64(1.0 * a)) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, 1 \cdot a\right)
\end{array}
Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
sum-to-multN/A
lower-special-*.f64N/A
Applied rewrites73.0%
Taylor expanded in a around inf
Applied rewrites38.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6438.8
Applied rewrites38.8%
herbie shell --seed 2025154
(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)))