
(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 23 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 y i (fma (log c) (- b 0.5) (+ (+ a t) (fma (log y) x z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma(log(c), (b - 0.5), ((a + t) + fma(log(y), x, z))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(log(c), Float64(b - 0.5), Float64(Float64(a + t) + fma(log(y), x, z)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[(a + t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(a + t\right) + \mathsf{fma}\left(\log y, x, z\right)\right)\right)
\end{array}
Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (fma (log y) x z) 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 ((fma(log(y), x, z) + a) + ((b - 0.5) * log(c))) + (y * i);
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(fma(log(y), x, z) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[Log[y], $MachinePrecision] * x + z), $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(\mathsf{fma}\left(\log y, x, z\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f6484.1
Applied rewrites84.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (log c) (- b 0.5) z)))
(if (<= x -2.65e+126)
(+ (* (+ (/ t_1 x) (log y)) x) a)
(if (<= x 4e+115)
(fma y i (+ (+ t_1 t) a))
(+ (fma (log c) b (fma x (log y) z)) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(log(c), (b - 0.5), z);
double tmp;
if (x <= -2.65e+126) {
tmp = (((t_1 / x) + log(y)) * x) + a;
} else if (x <= 4e+115) {
tmp = fma(y, i, ((t_1 + t) + a));
} else {
tmp = fma(log(c), b, fma(x, log(y), z)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(c), Float64(b - 0.5), z) tmp = 0.0 if (x <= -2.65e+126) tmp = Float64(Float64(Float64(Float64(t_1 / x) + log(y)) * x) + a); elseif (x <= 4e+115) tmp = fma(y, i, Float64(Float64(t_1 + t) + a)); else tmp = Float64(fma(log(c), b, fma(x, log(y), z)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -2.65e+126], N[(N[(N[(N[(t$95$1 / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[x, 4e+115], N[(y * i + N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * b + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\
\;\;\;\;\left(\frac{t\_1}{x} + \log y\right) \cdot x + a\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(t\_1 + t\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a\\
\end{array}
\end{array}
if x < -2.65000000000000014e126Initial program 99.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6482.9
Applied rewrites82.9%
Taylor expanded in t around 0
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f6473.0
Applied rewrites73.0%
Taylor expanded in x around inf
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.9%
if -2.65000000000000014e126 < x < 4.0000000000000001e115Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f6497.6
Applied rewrites97.6%
if 4.0000000000000001e115 < x Initial program 99.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f6471.1
Applied rewrites71.1%
Taylor expanded in b around inf
Applied rewrites71.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (fma (log c) b (fma x (log y) z)) a)))
(if (<= x -2.65e+126)
t_1
(if (<= x 4e+115) (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(log(c), b, fma(x, log(y), z)) + a;
double tmp;
if (x <= -2.65e+126) {
tmp = t_1;
} else if (x <= 4e+115) {
tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(log(c), b, fma(x, log(y), z)) + a) tmp = 0.0 if (x <= -2.65e+126) tmp = t_1; elseif (x <= 4e+115) tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[Log[c], $MachinePrecision] * b + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -2.65e+126], t$95$1, If[LessEqual[x, 4e+115], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.65000000000000014e126 or 4.0000000000000001e115 < x Initial program 99.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6482.3
Applied rewrites82.3%
Taylor expanded in t around 0
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f6472.0
Applied rewrites72.0%
Taylor expanded in b around inf
Applied rewrites72.0%
if -2.65000000000000014e126 < x < 4.0000000000000001e115Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f6497.6
Applied rewrites97.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.85e+115) (fma y i (fma (log c) (- b 0.5) (+ t (fma (log y) x z)))) (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.85e+115) {
tmp = fma(y, i, fma(log(c), (b - 0.5), (t + fma(log(y), x, z))));
} else {
tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.85e+115) tmp = fma(y, i, fma(log(c), Float64(b - 0.5), Float64(t + fma(log(y), x, z)))); else tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.85e+115], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(t + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.85 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, t + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
\end{array}
\end{array}
if a < 2.84999999999999983e115Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in t around inf
Applied rewrites90.1%
if 2.84999999999999983e115 < a Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f6490.3
Applied rewrites90.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y i (* (log y) x))))
(if (<= x -4e+198)
t_1
(if (<= x 7.8e+195)
(fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(y, i, (log(y) * x));
double tmp;
if (x <= -4e+198) {
tmp = t_1;
} else if (x <= 7.8e+195) {
tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, i, Float64(log(y) * x)) tmp = 0.0 if (x <= -4e+198) tmp = t_1; elseif (x <= 7.8e+195) tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+198], t$95$1, If[LessEqual[x, 7.8e+195], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.00000000000000007e198 or 7.7999999999999995e195 < x Initial program 99.6%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.7%
Taylor expanded in x around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lift-log.f64N/A
lift-*.f6473.1
Applied rewrites73.1%
if -4.00000000000000007e198 < x < 7.7999999999999995e195Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f6494.4
Applied rewrites94.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y i (* (log y) x))))
(if (<= x -4e+198)
t_1
(if (<= x 7.8e+195) (+ (+ (+ z a) (* (- b 0.5) (log c))) (* 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 = fma(y, i, (log(y) * x));
double tmp;
if (x <= -4e+198) {
tmp = t_1;
} else if (x <= 7.8e+195) {
tmp = ((z + a) + ((b - 0.5) * log(c))) + (y * i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, i, Float64(log(y) * x)) tmp = 0.0 if (x <= -4e+198) tmp = t_1; elseif (x <= 7.8e+195) tmp = Float64(Float64(Float64(z + a) + Float64(Float64(b - 0.5) * log(c))) + 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[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+198], t$95$1, If[LessEqual[x, 7.8e+195], N[(N[(N[(z + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\
\;\;\;\;\left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.00000000000000007e198 or 7.7999999999999995e195 < x Initial program 99.6%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.7%
Taylor expanded in x around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lift-log.f64N/A
lift-*.f6473.1
Applied rewrites73.1%
if -4.00000000000000007e198 < x < 7.7999999999999995e195Initial program 99.8%
Taylor expanded in z around inf
Applied rewrites77.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= (+ (+ (+ (+ (+ (* x (log y)) z) t) a) t_1) (* y i)) 2e+18)
(fma y i (fma (log c) (- b 0.5) z))
(+ (+ (+ t a) t_1) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 2e+18) {
tmp = fma(y, i, fma(log(c), (b - 0.5), z));
} else {
tmp = ((t + a) + t_1) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + t_1) + Float64(y * i)) <= 2e+18) tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z)); else tmp = Float64(Float64(Float64(t + a) + t_1) + Float64(y * i)); 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]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], 2e+18], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t + a\right) + t\_1\right) + y \cdot i\\
\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)) < 2e18Initial program 99.9%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around inf
+-commutative54.6
*-commutative54.6
+-commutative54.6
associate-+l+54.6
Applied rewrites54.6%
if 2e18 < (+.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%
Taylor expanded in t around inf
Applied rewrites68.7%
(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))
2e+18)
(fma y i (fma (log c) (- b 0.5) z))
(fma y i (fma (log c) (- b 0.5) 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)) <= 2e+18) {
tmp = fma(y, i, fma(log(c), (b - 0.5), z));
} else {
tmp = fma(y, i, fma(log(c), (b - 0.5), 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)) <= 2e+18) tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z)); else tmp = fma(y, i, fma(log(c), Float64(b - 0.5), 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], 2e+18], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + 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 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\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)) < 2e18Initial program 99.9%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around inf
+-commutative54.6
*-commutative54.6
+-commutative54.6
associate-+l+54.6
Applied rewrites54.6%
if 2e18 < (+.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
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in a around inf
+-commutative53.8
*-commutative53.8
+-commutative53.8
associate-+l+53.8
Applied rewrites53.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ (+ (* x (log y)) z) t) a))
(t_2 (+ (+ t_1 (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 (- INFINITY))
(* i y)
(if (<= t_2 -20000.0) t_1 (fma y i (fma (log c) (- b 0.5) 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;
double t_2 = (t_1 + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = i * y;
} else if (t_2 <= -20000.0) {
tmp = t_1;
} else {
tmp = fma(y, i, fma(log(c), (b - 0.5), a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) t_2 = Float64(Float64(t_1 + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(i * y); elseif (t_2 <= -20000.0) tmp = t_1; else tmp = fma(y, i, fma(log(c), Float64(b - 0.5), a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$2, -20000.0], t$95$1, N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\
t_2 := \left(t\_1 + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_2 \leq -20000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\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)) < -inf.0Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6496.0
Applied rewrites96.0%
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)) < -2e4Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6486.8
Applied rewrites86.8%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6469.0
Applied rewrites69.0%
if -2e4 < (+.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
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in a around inf
+-commutative55.0
*-commutative55.0
+-commutative55.0
associate-+l+55.0
Applied rewrites55.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ (+ (* x (log y)) z) t) a)))
(if (<= y 1.32e-185)
t_1
(if (<= y 1.55e-109)
(+ (fma (log c) (- b 0.5) z) a)
(if (<= y 1.9e+150) t_1 (fma y i z))))))
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;
double tmp;
if (y <= 1.32e-185) {
tmp = t_1;
} else if (y <= 1.55e-109) {
tmp = fma(log(c), (b - 0.5), z) + a;
} else if (y <= 1.9e+150) {
tmp = t_1;
} else {
tmp = fma(y, i, z);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) tmp = 0.0 if (y <= 1.32e-185) tmp = t_1; elseif (y <= 1.55e-109) tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a); elseif (y <= 1.9e+150) tmp = t_1; else tmp = fma(y, i, z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[y, 1.32e-185], t$95$1, If[LessEqual[y, 1.55e-109], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[y, 1.9e+150], t$95$1, N[(y * i + z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\
\mathbf{if}\;y \leq 1.32 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-109}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\end{array}
\end{array}
if y < 1.32e-185 or 1.55e-109 < y < 1.89999999999999995e150Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6485.7
Applied rewrites85.7%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6466.4
Applied rewrites66.4%
if 1.32e-185 < y < 1.55e-109Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6497.6
Applied rewrites97.6%
Taylor expanded in t around 0
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f6480.0
Applied rewrites80.0%
Taylor expanded in x around 0
Applied rewrites60.3%
if 1.89999999999999995e150 < y Initial program 99.8%
Taylor expanded in z around inf
Applied rewrites31.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6431.1
Applied rewrites31.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 -4e+203)
(fma y i z)
(if (<= t_2 2e+61)
(+ (fma (log c) (- b 0.5) z) a)
(if (<= t_2 1e+307) (+ (+ t_1 t) a) (fma y i (* (log y) x)))))))
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 t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -4e+203) {
tmp = fma(y, i, z);
} else if (t_2 <= 2e+61) {
tmp = fma(log(c), (b - 0.5), z) + a;
} else if (t_2 <= 1e+307) {
tmp = (t_1 + t) + a;
} else {
tmp = fma(y, i, (log(y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= -4e+203) tmp = fma(y, i, z); elseif (t_2 <= 2e+61) tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a); elseif (t_2 <= 1e+307) tmp = Float64(Float64(t_1 + t) + a); else tmp = fma(y, i, Float64(log(y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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, -4e+203], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 2e+61], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision], N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+203}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;\left(t\_1 + t\right) + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \log y \cdot x\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)) < -4e203Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites40.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.5
Applied rewrites40.5%
if -4e203 < (+.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.9999999999999999e61Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6486.0
Applied rewrites86.0%
Taylor expanded in t around 0
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f6469.8
Applied rewrites69.8%
Taylor expanded in x around 0
Applied rewrites56.0%
if 1.9999999999999999e61 < (+.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.99999999999999986e306Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.9
Applied rewrites87.9%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6452.4
Applied rewrites52.4%
if 9.99999999999999986e306 < (+.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.2%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.2%
Taylor expanded in x around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lift-log.f64N/A
lift-*.f6492.6
Applied rewrites92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 2e+18)
(fma y i z)
(if (<= t_2 1e+307) (+ (+ t_1 t) a) (fma y i (* (log y) x))))))
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 t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= 2e+18) {
tmp = fma(y, i, z);
} else if (t_2 <= 1e+307) {
tmp = (t_1 + t) + a;
} else {
tmp = fma(y, i, (log(y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= 2e+18) tmp = fma(y, i, z); elseif (t_2 <= 1e+307) tmp = Float64(Float64(t_1 + t) + a); else tmp = fma(y, i, Float64(log(y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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, 2e+18], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision], N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;\left(t\_1 + t\right) + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \log y \cdot x\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)) < 2e18Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
if 2e18 < (+.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.99999999999999986e306Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.7
Applied rewrites87.7%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6452.3
Applied rewrites52.3%
if 9.99999999999999986e306 < (+.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.2%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.2%
Taylor expanded in x around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lift-log.f64N/A
lift-*.f6492.6
Applied rewrites92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 2e+18)
(fma y i z)
(if (<= t_2 1e+307) (+ t_1 a) (fma y i (* (log y) x))))))
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 t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= 2e+18) {
tmp = fma(y, i, z);
} else if (t_2 <= 1e+307) {
tmp = t_1 + a;
} else {
tmp = fma(y, i, (log(y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= 2e+18) tmp = fma(y, i, z); elseif (t_2 <= 1e+307) tmp = Float64(t_1 + a); else tmp = fma(y, i, Float64(log(y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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, 2e+18], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(t$95$1 + a), $MachinePrecision], N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_1 + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \log y \cdot x\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)) < 2e18Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
if 2e18 < (+.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.99999999999999986e306Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.7
Applied rewrites87.7%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6435.4
Applied rewrites35.4%
if 9.99999999999999986e306 < (+.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.2%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.2%
Taylor expanded in x around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lift-log.f64N/A
lift-*.f6492.6
Applied rewrites92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 2e+18)
(fma y i z)
(if (<= t_2 1e+307) (+ t_1 a) (fma y i (* (log c) b))))))
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 t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= 2e+18) {
tmp = fma(y, i, z);
} else if (t_2 <= 1e+307) {
tmp = t_1 + a;
} else {
tmp = fma(y, i, (log(c) * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= 2e+18) tmp = fma(y, i, z); elseif (t_2 <= 1e+307) tmp = Float64(t_1 + a); else tmp = fma(y, i, Float64(log(c) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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, 2e+18], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(t$95$1 + a), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_1 + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \log c \cdot b\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)) < 2e18Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
if 2e18 < (+.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.99999999999999986e306Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.7
Applied rewrites87.7%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6435.4
Applied rewrites35.4%
if 9.99999999999999986e306 < (+.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.2%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.2%
Taylor expanded in b around inf
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6491.0
Applied rewrites91.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
(if (<= t_2 2e+18) (fma y i z) (if (<= t_2 5e+303) (+ t_1 a) (fma y i 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);
double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= 2e+18) {
tmp = fma(y, i, z);
} else if (t_2 <= 5e+303) {
tmp = t_1 + a;
} else {
tmp = fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= 2e+18) tmp = fma(y, i, z); elseif (t_2 <= 5e+303) tmp = Float64(t_1 + a); else tmp = fma(y, i, a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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, 2e+18], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 5e+303], N[(t$95$1 + a), $MachinePrecision], N[(y * i + a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;t\_1 + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 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)) < 2e18Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
if 2e18 < (+.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.9999999999999997e303Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6487.5
Applied rewrites87.5%
Taylor expanded in x around inf
lower-*.f64N/A
lift-log.f6435.1
Applied rewrites35.1%
if 4.9999999999999997e303 < (+.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.3%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.3%
Taylor expanded in a around inf
+-commutative80.5
+-commutative80.5
*-commutative80.5
+-commutative80.5
associate-+l+80.5
*-commutative80.5
Applied rewrites80.5%
(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))
2e+18)
(fma y i z)
(fma y i a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= 2e+18) {
tmp = fma(y, i, z);
} else {
tmp = fma(y, i, 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)) <= 2e+18) tmp = fma(y, i, z); else tmp = fma(y, i, 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], 2e+18], N[(y * i + z), $MachinePrecision], N[(y * i + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 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)) < 2e18Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
if 2e18 < (+.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
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in a around inf
+-commutative38.5
+-commutative38.5
*-commutative38.5
+-commutative38.5
associate-+l+38.5
*-commutative38.5
Applied rewrites38.5%
(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 (- INFINITY))
(* i y)
(if (<= t_1 -100.0) (+ z a) (fma y i 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 <= -((double) INFINITY)) {
tmp = i * y;
} else if (t_1 <= -100.0) {
tmp = z + a;
} else {
tmp = fma(y, i, 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 <= Float64(-Inf)) tmp = Float64(i * y); elseif (t_1 <= -100.0) tmp = Float64(z + a); else tmp = fma(y, i, 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, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(z + a), $MachinePrecision], N[(y * i + a), $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 -\infty:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_1 \leq -100:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, 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)) < -inf.0Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6496.0
Applied rewrites96.0%
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)) < -100Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6486.9
Applied rewrites86.9%
Taylor expanded in z around inf
Applied rewrites34.4%
if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
lift-*.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in a around inf
+-commutative37.8
+-commutative37.8
*-commutative37.8
+-commutative37.8
associate-+l+37.8
*-commutative37.8
Applied rewrites37.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 5.8e+32) (+ z a) (* i y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 5.8e+32) {
tmp = z + a;
} else {
tmp = i * y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 5.8d+32) then
tmp = z + a
else
tmp = i * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 5.8e+32) {
tmp = z + a;
} else {
tmp = i * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 5.8e+32: tmp = z + a else: tmp = i * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 5.8e+32) tmp = Float64(z + a); else tmp = Float64(i * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 5.8e+32) tmp = z + a; else tmp = i * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 5.8e+32], N[(z + a), $MachinePrecision], N[(i * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.8 \cdot 10^{+32}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;i \cdot y\\
\end{array}
\end{array}
if y < 5.80000000000000006e32Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6494.2
Applied rewrites94.2%
Taylor expanded in z around inf
Applied rewrites37.2%
if 5.80000000000000006e32 < y Initial program 99.8%
Taylor expanded in y around inf
lower-*.f6444.4
Applied rewrites44.4%
(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))
-100.0)
z
(+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -100.0) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-100.0d0)) then
tmp = z
else
tmp = t + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -100.0) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -100.0: tmp = z else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -100.0) tmp = z; else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -100.0) tmp = z; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -100.0], z, N[(t + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -100:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\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)) < -100Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites16.0%
if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6478.1
Applied rewrites78.1%
Taylor expanded in t around inf
Applied rewrites31.1%
(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))
-100.0)
z
a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -100.0) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-100.0d0)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -100.0) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -100.0: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -100.0) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -100.0) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -100.0], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -100:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\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)) < -100Initial program 99.9%
Taylor expanded in z around inf
Applied rewrites16.0%
if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.8%
Taylor expanded in a around inf
Applied rewrites16.8%
(FPCore (x y z t a b c i) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z + a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = z + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z + a;
}
def code(x, y, z, t, a, b, c, i): return z + a
function code(x, y, z, t, a, b, c, i) return Float64(z + a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z + a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z + a), $MachinePrecision]
\begin{array}{l}
\\
z + a
\end{array}
Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-log.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-log.f6477.7
Applied rewrites77.7%
Taylor expanded in z around inf
Applied rewrites30.9%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
Taylor expanded in a around inf
Applied rewrites16.6%
herbie shell --seed 2025119
(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)))