
(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);
}
real(8) function code(x, y, z, t, a, b, c, i)
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}
Sampling outcomes in binary64 precision:
Herbie found 15 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);
}
real(8) function code(x, y, z, t, a, b, c, i)
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 x (log y) (+ z t)) (fma (+ b -0.5) (log c) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, (fma(x, log(y), (z + t)) + fma((b + -0.5), log(c), a)));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, Float64(fma(x, log(y), Float64(z + t)) + fma(Float64(b + -0.5), log(c), a))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, z + t\right) + \mathsf{fma}\left(b + -0.5, \log c, a\right)\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
lower-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
Applied rewrites99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))) (t_2 (* (log c) (- b 0.5))))
(if (<= t_2 -5e+173)
(+ a t_1)
(if (<= t_2 1e+175) (+ (+ z t) (+ a (* y i))) (fma y i t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = log(c) * (b - 0.5);
double tmp;
if (t_2 <= -5e+173) {
tmp = a + t_1;
} else if (t_2 <= 1e+175) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = fma(y, i, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (t_2 <= -5e+173) tmp = Float64(a + t_1); elseif (t_2 <= 1e+175) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); else tmp = fma(y, i, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+173], N[(a + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 1e+175], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+173}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+175}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.00000000000000034e173Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6487.2
Applied rewrites87.2%
Taylor expanded in b around inf
Applied rewrites62.0%
if -5.00000000000000034e173 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e174Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6496.3
Applied rewrites96.3%
Taylor expanded in i around inf
Applied rewrites73.8%
if 9.9999999999999994e174 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) 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
lower-+.f64N/A
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
Applied rewrites99.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6470.0
Applied rewrites70.0%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y)))))))
-200.0)
(+ (+ z t) (* y i))
(+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))))) <= -200.0) {
tmp = (z + t) + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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 * i) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y))))))) <= (-200.0d0)) then
tmp = (z + t) + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((y * i) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y))))))) <= -200.0) {
tmp = (z + t) + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((y * i) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y))))))) <= -200.0: tmp = (z + t) + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) <= -200.0) tmp = Float64(Float64(z + t) + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))))) <= -200.0) tmp = (z + t) + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -200.0], N[(N[(z + t), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) \leq -200:\\
\;\;\;\;\left(z + t\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + 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)) < -200Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6480.2
Applied rewrites80.2%
Taylor expanded in i around inf
Applied rewrites43.7%
if -200 < (+.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.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6481.0
Applied rewrites81.0%
Taylor expanded in i around inf
Applied rewrites38.8%
Final simplification41.3%
(FPCore (x y z t a b c i) :precision binary64 (+ a (fma i y (fma (log c) (+ b -0.5) (fma x (log y) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + fma(i, y, fma(log(c), (b + -0.5), fma(x, log(y), z)));
}
function code(x, y, z, t, a, b, c, i) return Float64(a + fma(i, y, fma(log(c), Float64(b + -0.5), fma(x, log(y), z)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b + -0.5, \mathsf{fma}\left(x, \log y, z\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f6484.0
Applied rewrites84.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (fma (log c) (+ b -0.5) z)))))
(if (<= (- b 0.5) -1e+210)
t_1
(if (<= (- b 0.5) 1e+144)
(+ (+ z t) (+ a (fma i y (* x (log y)))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + fma(log(c), (b + -0.5), z));
double tmp;
if ((b - 0.5) <= -1e+210) {
tmp = t_1;
} else if ((b - 0.5) <= 1e+144) {
tmp = (z + t) + (a + fma(i, y, (x * log(y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + fma(log(c), Float64(b + -0.5), z))) tmp = 0.0 if (Float64(b - 0.5) <= -1e+210) tmp = t_1; elseif (Float64(b - 0.5) <= 1e+144) tmp = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+210], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+144], N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq 10^{+144}:\\
\;\;\;\;\left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.99999999999999927e209 or 1.00000000000000002e144 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6491.2
Applied rewrites91.2%
Taylor expanded in i around 0
Applied rewrites80.7%
if -9.99999999999999927e209 < (-.f64 b #s(literal 1/2 binary64)) < 1.00000000000000002e144Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6496.5
Applied rewrites96.5%
Taylor expanded in x around inf
Applied rewrites94.7%
Final simplification91.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ z t) (+ a (fma i y (* x (log y)))))))
(if (<= x -1.4e+95)
t_1
(if (<= x 3.6e+109)
(+ (+ t (+ a (fma (log c) (+ b -0.5) z))) (* 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 = (z + t) + (a + fma(i, y, (x * log(y))));
double tmp;
if (x <= -1.4e+95) {
tmp = t_1;
} else if (x <= 3.6e+109) {
tmp = (t + (a + fma(log(c), (b + -0.5), z))) + (y * i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y))))) tmp = 0.0 if (x <= -1.4e+95) tmp = t_1; elseif (x <= 3.6e+109) tmp = Float64(Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z))) + 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[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+95], t$95$1, If[LessEqual[x, 3.6e+109], N[(N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\
\;\;\;\;\left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.3999999999999999e95 or 3.6e109 < x Initial program 99.7%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.1
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites92.1%
if -1.3999999999999999e95 < x < 3.6e109Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6497.6
Applied rewrites97.6%
Final simplification95.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ z t) (+ a (fma i y (* x (log y)))))))
(if (<= x -1.4e+95)
t_1
(if (<= x 3.6e+109)
(+ a (+ (fma i y z) (fma (log c) (+ b -0.5) t)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + t) + (a + fma(i, y, (x * log(y))));
double tmp;
if (x <= -1.4e+95) {
tmp = t_1;
} else if (x <= 3.6e+109) {
tmp = a + (fma(i, y, z) + fma(log(c), (b + -0.5), t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y))))) tmp = 0.0 if (x <= -1.4e+95) tmp = t_1; elseif (x <= 3.6e+109) tmp = Float64(a + Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+95], t$95$1, If[LessEqual[x, 3.6e+109], N[(a + N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.3999999999999999e95 or 3.6e109 < x Initial program 99.7%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.1
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites92.1%
if -1.3999999999999999e95 < x < 3.6e109Initial program 99.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6497.6
Applied rewrites97.6%
Final simplification95.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ z t) (fma y i (fma (log c) -0.5 a)))))
(if (<= i -1.4e+70)
t_1
(if (<= i 3.6e+54) (+ (+ z t) (+ a (* x (log y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + t) + fma(y, i, fma(log(c), -0.5, a));
double tmp;
if (i <= -1.4e+70) {
tmp = t_1;
} else if (i <= 3.6e+54) {
tmp = (z + t) + (a + (x * log(y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + t) + fma(y, i, fma(log(c), -0.5, a))) tmp = 0.0 if (i <= -1.4e+70) tmp = t_1; elseif (i <= 3.6e+54) tmp = Float64(Float64(z + t) + Float64(a + Float64(x * log(y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(y * i + N[(N[Log[c], $MachinePrecision] * -0.5 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.4e+70], t$95$1, If[LessEqual[i, 3.6e+54], N[(N[(z + t), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + t\right) + \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, -0.5, a\right)\right)\\
\mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\
\;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.39999999999999995e70 or 3.6000000000000001e54 < i Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6489.1
Applied rewrites89.1%
Taylor expanded in x around 0
Applied rewrites81.0%
if -1.39999999999999995e70 < i < 3.6000000000000001e54Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6478.7
Applied rewrites78.7%
Taylor expanded in x around inf
Applied rewrites75.3%
Final simplification77.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ z t) (+ a (* y i)))))
(if (<= i -1.4e+70)
t_1
(if (<= i 3.6e+54) (+ (+ z t) (+ a (* x (log y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + t) + (a + (y * i));
double tmp;
if (i <= -1.4e+70) {
tmp = t_1;
} else if (i <= 3.6e+54) {
tmp = (z + t) + (a + (x * log(y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (z + t) + (a + (y * i))
if (i <= (-1.4d+70)) then
tmp = t_1
else if (i <= 3.6d+54) then
tmp = (z + t) + (a + (x * log(y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + t) + (a + (y * i));
double tmp;
if (i <= -1.4e+70) {
tmp = t_1;
} else if (i <= 3.6e+54) {
tmp = (z + t) + (a + (x * Math.log(y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z + t) + (a + (y * i)) tmp = 0 if i <= -1.4e+70: tmp = t_1 elif i <= 3.6e+54: tmp = (z + t) + (a + (x * math.log(y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + t) + Float64(a + Float64(y * i))) tmp = 0.0 if (i <= -1.4e+70) tmp = t_1; elseif (i <= 3.6e+54) tmp = Float64(Float64(z + t) + Float64(a + Float64(x * log(y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z + t) + (a + (y * i)); tmp = 0.0; if (i <= -1.4e+70) tmp = t_1; elseif (i <= 3.6e+54) tmp = (z + t) + (a + (x * log(y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.4e+70], t$95$1, If[LessEqual[i, 3.6e+54], N[(N[(z + t), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\
\;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.39999999999999995e70 or 3.6000000000000001e54 < i Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6489.1
Applied rewrites89.1%
Taylor expanded in i around inf
Applied rewrites80.0%
if -1.39999999999999995e70 < i < 3.6000000000000001e54Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6478.7
Applied rewrites78.7%
Taylor expanded in x around inf
Applied rewrites75.3%
Final simplification77.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b (log c)))))
(if (<= (- b 0.5) -1e+210)
t_1
(if (<= (- b 0.5) 1e+164) (+ (+ z t) (+ a (* y i))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * log(c));
double tmp;
if ((b - 0.5) <= -1e+210) {
tmp = t_1;
} else if ((b - 0.5) <= 1e+164) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (b * log(c))
if ((b - 0.5d0) <= (-1d+210)) then
tmp = t_1
else if ((b - 0.5d0) <= 1d+164) then
tmp = (z + t) + (a + (y * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * Math.log(c));
double tmp;
if ((b - 0.5) <= -1e+210) {
tmp = t_1;
} else if ((b - 0.5) <= 1e+164) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * math.log(c)) tmp = 0 if (b - 0.5) <= -1e+210: tmp = t_1 elif (b - 0.5) <= 1e+164: tmp = (z + t) + (a + (y * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * log(c))) tmp = 0.0 if (Float64(b - 0.5) <= -1e+210) tmp = t_1; elseif (Float64(b - 0.5) <= 1e+164) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * log(c)); tmp = 0.0; if ((b - 0.5) <= -1e+210) tmp = t_1; elseif ((b - 0.5) <= 1e+164) tmp = (z + t) + (a + (y * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+210], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+164], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot \log c\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq 10^{+164}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.99999999999999927e209 or 1e164 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6490.5
Applied rewrites90.5%
Taylor expanded in b around inf
Applied rewrites68.6%
if -9.99999999999999927e209 < (-.f64 b #s(literal 1/2 binary64)) < 1e164Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6495.9
Applied rewrites95.9%
Taylor expanded in i around inf
Applied rewrites73.1%
Final simplification72.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= (- b 0.5) -1e+230)
t_1
(if (<= (- b 0.5) 2e+173) (+ (+ z t) (+ a (* y i))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if ((b - 0.5) <= -1e+230) {
tmp = t_1;
} else if ((b - 0.5) <= 2e+173) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if ((b - 0.5d0) <= (-1d+230)) then
tmp = t_1
else if ((b - 0.5d0) <= 2d+173) then
tmp = (z + t) + (a + (y * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * Math.log(c);
double tmp;
if ((b - 0.5) <= -1e+230) {
tmp = t_1;
} else if ((b - 0.5) <= 2e+173) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if (b - 0.5) <= -1e+230: tmp = t_1 elif (b - 0.5) <= 2e+173: tmp = (z + t) + (a + (y * i)) 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 (Float64(b - 0.5) <= -1e+230) tmp = t_1; elseif (Float64(b - 0.5) <= 2e+173) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if ((b - 0.5) <= -1e+230) tmp = t_1; elseif ((b - 0.5) <= 2e+173) tmp = (z + t) + (a + (y * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+230], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+173], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+173}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -1.0000000000000001e230 or 2e173 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.4
Applied rewrites63.4%
if -1.0000000000000001e230 < (-.f64 b #s(literal 1/2 binary64)) < 2e173Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6494.7
Applied rewrites94.7%
Taylor expanded in i around inf
Applied rewrites72.7%
Final simplification70.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -3.4e+246)
t_1
(if (<= x 1.7e+240) (+ (+ z t) (+ a (* y i))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -3.4e+246) {
tmp = t_1;
} else if (x <= 1.7e+240) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-3.4d+246)) then
tmp = t_1
else if (x <= 1.7d+240) then
tmp = (z + t) + (a + (y * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -3.4e+246) {
tmp = t_1;
} else if (x <= 1.7e+240) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -3.4e+246: tmp = t_1 elif x <= 1.7e+240: tmp = (z + t) + (a + (y * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -3.4e+246) tmp = t_1; elseif (x <= 1.7e+240) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -3.4e+246) tmp = t_1; elseif (x <= 1.7e+240) tmp = (z + t) + (a + (y * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+246], t$95$1, If[LessEqual[x, 1.7e+240], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+240}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.39999999999999988e246 or 1.70000000000000004e240 < x Initial program 99.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6469.9
Applied rewrites69.9%
if -3.39999999999999988e246 < x < 1.70000000000000004e240Initial program 99.9%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6480.4
Applied rewrites80.4%
Taylor expanded in i around inf
Applied rewrites68.5%
Final simplification68.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ z t) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (z + t) + (a + (y * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
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 + t) + (a + (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 (z + t) + (a + (y * i));
}
def code(x, y, z, t, a, b, c, i): return (z + t) + (a + (y * i))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + t) + Float64(a + Float64(y * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (z + t) + (a + (y * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + t\right) + \left(a + y \cdot i\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6482.5
Applied rewrites82.5%
Taylor expanded in i around inf
Applied rewrites63.1%
Final simplification63.1%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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 + (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 a + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6481.1
Applied rewrites81.1%
Taylor expanded in i around inf
Applied rewrites38.4%
(FPCore (x y z t a b c i) :precision binary64 (* y i))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return y * i;
}
real(8) function code(x, y, z, t, a, b, c, i)
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 = 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 y * i;
}
def code(x, y, z, t, a, b, c, i): return y * i
function code(x, y, z, t, a, b, c, i) return Float64(y * i) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = y * i; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i
\end{array}
Initial program 99.8%
Taylor expanded in y around inf
lower-*.f6422.7
Applied rewrites22.7%
Final simplification22.7%
herbie shell --seed 2024220
(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)))