
(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 18 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 (+ (* i y) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
}
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 = (i * y) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (log(y) * x)))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (Math.log(y) * x)))));
}
def code(x, y, z, t, a, b, c, i): return (i * y) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (math.log(y) * x)))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (* i y) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x))))))
-100.0)
(fma (/ (* i y) z) z z)
(+ (* i y) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))))) <= -100.0) {
tmp = fma(((i * y) / z), z, z);
} else {
tmp = (i * y) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x)))))) <= -100.0) tmp = fma(Float64(Float64(i * y) / z), z, z); else tmp = Float64(Float64(i * y) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -100.0], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right) \leq -100:\\
\;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + 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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
Applied rewrites77.1%
Taylor expanded in y around inf
Applied rewrites35.9%
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 x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.8
Applied rewrites85.8%
Taylor expanded in t around 0
Applied rewrites67.6%
Taylor expanded in y around inf
Applied rewrites35.8%
Final simplification35.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (- b 0.5) (log c) (fma y i z))))
(if (<= i -2.8e+31)
(+ t_1 a)
(if (<= i 5.6e-24)
(+ (fma (- b 0.5) (log c) (fma (log y) x z)) (+ a t))
(+ (+ a t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma((b - 0.5), log(c), fma(y, i, z));
double tmp;
if (i <= -2.8e+31) {
tmp = t_1 + a;
} else if (i <= 5.6e-24) {
tmp = fma((b - 0.5), log(c), fma(log(y), x, z)) + (a + t);
} else {
tmp = (a + t) + t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(Float64(b - 0.5), log(c), fma(y, i, z)) tmp = 0.0 if (i <= -2.8e+31) tmp = Float64(t_1 + a); elseif (i <= 5.6e-24) tmp = Float64(fma(Float64(b - 0.5), log(c), fma(log(y), x, z)) + Float64(a + t)); else tmp = Float64(Float64(a + t) + t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.8e+31], N[(t$95$1 + a), $MachinePrecision], If[LessEqual[i, 5.6e-24], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right)\\
\mathbf{if}\;i \leq -2.8 \cdot 10^{+31}:\\
\;\;\;\;t\_1 + a\\
\mathbf{elif}\;i \leq 5.6 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, z\right)\right) + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + t\right) + t\_1\\
\end{array}
\end{array}
if i < -2.80000000000000017e31Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6493.7
Applied rewrites93.7%
Taylor expanded in t around 0
Applied rewrites85.1%
if -2.80000000000000017e31 < i < 5.6000000000000003e-24Initial program 99.8%
Taylor expanded in y around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f6498.2
Applied rewrites98.2%
if 5.6000000000000003e-24 < i Initial program 100.0%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6491.6
Applied rewrites91.6%
Final simplification93.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -5.5e+220)
(+ (* (+ (/ a x) (log y)) x) (* i y))
(if (<= x 6.3e+246)
(+ (+ a t) (fma (- b 0.5) (log c) (fma y i z)))
(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 tmp;
if (x <= -5.5e+220) {
tmp = (((a / x) + log(y)) * x) + (i * y);
} else if (x <= 6.3e+246) {
tmp = (a + t) + fma((b - 0.5), log(c), fma(y, i, z));
} else {
tmp = fma(y, i, (log(y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -5.5e+220) tmp = Float64(Float64(Float64(Float64(a / x) + log(y)) * x) + Float64(i * y)); elseif (x <= 6.3e+246) tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(y, i, z))); else tmp = fma(y, i, Float64(log(y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -5.5e+220], N[(N[(N[(N[(a / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.3e+246], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+220}:\\
\;\;\;\;\left(\frac{a}{x} + \log y\right) \cdot x + i \cdot y\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{+246}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \log y \cdot x\right)\\
\end{array}
\end{array}
if x < -5.4999999999999999e220Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in a around inf
Applied rewrites93.7%
if -5.4999999999999999e220 < x < 6.3e246Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6493.4
Applied rewrites93.4%
if 6.3e246 < x Initial program 99.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6499.5
Applied rewrites99.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.5
Applied rewrites99.5%
Final simplification93.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y i (* (log y) x))))
(if (<= x -6e+220)
t_1
(if (<= x 6.3e+246)
(+ (+ a t) (fma (- b 0.5) (log c) (fma y i z)))
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 <= -6e+220) {
tmp = t_1;
} else if (x <= 6.3e+246) {
tmp = (a + t) + fma((b - 0.5), log(c), fma(y, i, z));
} 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 <= -6e+220) tmp = t_1; elseif (x <= 6.3e+246) tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(y, i, z))); 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, -6e+220], t$95$1, If[LessEqual[x, 6.3e+246], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $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 -6 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{+246}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.00000000000000048e220 or 6.3e246 < x Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6491.5
Applied rewrites91.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6491.5
Applied rewrites91.5%
if -6.00000000000000048e220 < x < 6.3e246Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6493.4
Applied rewrites93.4%
Final simplification93.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y i (* (log y) x))))
(if (<= x -6e+220)
t_1
(if (<= x 6.3e+246) (+ (fma (- b 0.5) (log c) (fma y i z)) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(y, i, (log(y) * x));
double tmp;
if (x <= -6e+220) {
tmp = t_1;
} else if (x <= 6.3e+246) {
tmp = fma((b - 0.5), log(c), fma(y, i, z)) + 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 <= -6e+220) tmp = t_1; elseif (x <= 6.3e+246) tmp = Float64(fma(Float64(b - 0.5), log(c), fma(y, i, z)) + 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, -6e+220], t$95$1, If[LessEqual[x, 6.3e+246], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision] + a), $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 -6 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{+246}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.00000000000000048e220 or 6.3e246 < x Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6491.5
Applied rewrites91.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6491.5
Applied rewrites91.5%
if -6.00000000000000048e220 < x < 6.3e246Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6493.4
Applied rewrites93.4%
Taylor expanded in t around 0
Applied rewrites73.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) b)))
(if (<= (- b 0.5) -4e+222)
(+ t_1 a)
(if (<= (- b 0.5) 5e+170)
(+ (fma (/ z a) a a) (* i y))
(+ t_1 (+ a t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * b;
double tmp;
if ((b - 0.5) <= -4e+222) {
tmp = t_1 + a;
} else if ((b - 0.5) <= 5e+170) {
tmp = fma((z / a), a, a) + (i * y);
} else {
tmp = t_1 + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * b) tmp = 0.0 if (Float64(b - 0.5) <= -4e+222) tmp = Float64(t_1 + a); elseif (Float64(b - 0.5) <= 5e+170) tmp = Float64(fma(Float64(z / a), a, a) + Float64(i * y)); else tmp = Float64(t_1 + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+222], N[(t$95$1 + a), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+170], N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot b\\
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+222}:\\
\;\;\;\;t\_1 + a\\
\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(a + t\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.0000000000000002e222Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6490.5
Applied rewrites90.5%
Taylor expanded in t around 0
Applied rewrites90.5%
Taylor expanded in b around inf
Applied rewrites78.4%
if -4.0000000000000002e222 < (-.f64 b #s(literal 1/2 binary64)) < 4.99999999999999977e170Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6442.2
Applied rewrites42.2%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites77.0%
Taylor expanded in z around inf
Applied rewrites49.5%
if 4.99999999999999977e170 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.6
Applied rewrites89.6%
Taylor expanded in b around inf
Applied rewrites76.4%
Final simplification56.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* (log c) b) a)))
(if (<= (- b 0.5) -4e+222)
t_1
(if (<= (- b 0.5) 5e+170) (+ (fma (/ z a) a a) (* i y)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (log(c) * b) + a;
double tmp;
if ((b - 0.5) <= -4e+222) {
tmp = t_1;
} else if ((b - 0.5) <= 5e+170) {
tmp = fma((z / a), a, a) + (i * y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(log(c) * b) + a) tmp = 0.0 if (Float64(b - 0.5) <= -4e+222) tmp = t_1; elseif (Float64(b - 0.5) <= 5e+170) tmp = Float64(fma(Float64(z / a), a, a) + Float64(i * y)); 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), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+222], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+170], N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot b + a\\
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.0000000000000002e222 or 4.99999999999999977e170 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6490.0
Applied rewrites90.0%
Taylor expanded in t around 0
Applied rewrites85.2%
Taylor expanded in b around inf
Applied rewrites72.5%
if -4.0000000000000002e222 < (-.f64 b #s(literal 1/2 binary64)) < 4.99999999999999977e170Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6442.2
Applied rewrites42.2%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites77.0%
Taylor expanded in z around inf
Applied rewrites49.5%
Final simplification55.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* (log c) b) (* i y))))
(if (<= i -1.18e+111)
t_1
(if (<= i 8.8e+86) (+ (fma (- b 0.5) (log c) z) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (log(c) * b) + (i * y);
double tmp;
if (i <= -1.18e+111) {
tmp = t_1;
} else if (i <= 8.8e+86) {
tmp = fma((b - 0.5), log(c), z) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(log(c) * b) + Float64(i * y)) tmp = 0.0 if (i <= -1.18e+111) tmp = t_1; elseif (i <= 8.8e+86) tmp = Float64(fma(Float64(b - 0.5), log(c), z) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.18e+111], t$95$1, If[LessEqual[i, 8.8e+86], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot b + i \cdot y\\
\mathbf{if}\;i \leq -1.18 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 8.8 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, z\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.1799999999999999e111 or 8.80000000000000013e86 < i Initial program 99.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower-log.f6477.5
Applied rewrites77.5%
if -1.1799999999999999e111 < i < 8.80000000000000013e86Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6482.7
Applied rewrites82.7%
Taylor expanded in t around 0
Applied rewrites60.1%
Taylor expanded in y around 0
Applied rewrites56.2%
Final simplification63.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (fma (/ z a) a a) (* i y))))
(if (<= i -4.5e+108)
t_1
(if (<= i 2.7e+57) (+ (fma (- b 0.5) (log c) z) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma((z / a), a, a) + (i * y);
double tmp;
if (i <= -4.5e+108) {
tmp = t_1;
} else if (i <= 2.7e+57) {
tmp = fma((b - 0.5), log(c), z) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(Float64(z / a), a, a) + Float64(i * y)) tmp = 0.0 if (i <= -4.5e+108) tmp = t_1; elseif (i <= 2.7e+57) tmp = Float64(fma(Float64(b - 0.5), log(c), z) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4.5e+108], t$95$1, If[LessEqual[i, 2.7e+57], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\mathbf{if}\;i \leq -4.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.7 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, z\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -4.5e108 or 2.6999999999999998e57 < i Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6467.7
Applied rewrites67.7%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites76.1%
Taylor expanded in z around inf
Applied rewrites61.3%
if -4.5e108 < i < 2.6999999999999998e57Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6482.8
Applied rewrites82.8%
Taylor expanded in t around 0
Applied rewrites61.2%
Taylor expanded in y around 0
Applied rewrites57.8%
Final simplification59.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) b)))
(if (<= (- b 0.5) -4e+222)
t_1
(if (<= (- b 0.5) 1e+183) (+ (fma (/ z a) a a) (* i y)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * b;
double tmp;
if ((b - 0.5) <= -4e+222) {
tmp = t_1;
} else if ((b - 0.5) <= 1e+183) {
tmp = fma((z / a), a, a) + (i * y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * b) tmp = 0.0 if (Float64(b - 0.5) <= -4e+222) tmp = t_1; elseif (Float64(b - 0.5) <= 1e+183) tmp = Float64(fma(Float64(z / a), a, a) + Float64(i * y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+222], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+183], N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot b\\
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq 10^{+183}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.0000000000000002e222 or 9.99999999999999947e182 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-log.f6468.4
Applied rewrites68.4%
if -4.0000000000000002e222 < (-.f64 b #s(literal 1/2 binary64)) < 9.99999999999999947e182Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6442.3
Applied rewrites42.3%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites77.2%
Taylor expanded in z around inf
Applied rewrites49.0%
Final simplification53.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 5.4e+102) (fma (- b 0.5) (log c) (fma y i z)) (+ (fma (/ z a) a a) (* i y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.4e+102) {
tmp = fma((b - 0.5), log(c), fma(y, i, z));
} else {
tmp = fma((z / a), a, a) + (i * y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5.4e+102) tmp = fma(Float64(b - 0.5), log(c), fma(y, i, z)); else tmp = Float64(fma(Float64(z / a), a, a) + Float64(i * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.4e+102], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.4 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\end{array}
\end{array}
if a < 5.4000000000000002e102Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.3
Applied rewrites85.3%
Taylor expanded in t around 0
Applied rewrites66.8%
Taylor expanded in a around 0
Applied rewrites61.3%
if 5.4000000000000002e102 < a Initial program 100.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6428.2
Applied rewrites28.2%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around inf
Applied rewrites67.4%
Final simplification62.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.3e-54) (fma (/ (* i y) z) z z) (+ (fma (/ z a) a a) (* i y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.3e-54) {
tmp = fma(((i * y) / z), z, z);
} else {
tmp = fma((z / a), a, a) + (i * y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.3e-54) tmp = fma(Float64(Float64(i * y) / z), z, z); else tmp = Float64(fma(Float64(z / a), a, a) + Float64(i * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.3e-54], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.3 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right) + i \cdot y\\
\end{array}
\end{array}
if a < 1.30000000000000001e-54Initial program 99.9%
Taylor expanded in z around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
Applied rewrites74.9%
Taylor expanded in y around inf
Applied rewrites33.1%
if 1.30000000000000001e-54 < a Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6433.7
Applied rewrites33.7%
Taylor expanded in a around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites98.5%
Taylor expanded in z around inf
Applied rewrites51.9%
Final simplification38.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.02e+155) (fma (/ a z) z z) (+ (* i y) (+ a t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.02e+155) {
tmp = fma((a / z), z, z);
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.02e+155) tmp = fma(Float64(a / z), z, z); else tmp = Float64(Float64(i * y) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.02e+155], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+155}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\end{array}
\end{array}
if z < -1.02e155Initial program 99.9%
Taylor expanded in z around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
Applied rewrites99.8%
Taylor expanded in a around inf
Applied rewrites56.9%
if -1.02e155 < z Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6484.9
Applied rewrites84.9%
Taylor expanded in y around inf
Applied rewrites57.2%
Final simplification57.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= t -21000000000000.0) (fma (/ z t) t t) (+ (* i y) (+ a t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (t <= -21000000000000.0) {
tmp = fma((z / t), t, t);
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (t <= -21000000000000.0) tmp = fma(Float64(z / t), t, t); else tmp = Float64(Float64(i * y) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -21000000000000.0], N[(N[(z / t), $MachinePrecision] * t + t), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -21000000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, t, t\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\end{array}
\end{array}
if t < -2.1e13Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.8
Applied rewrites89.8%
Taylor expanded in t around inf
Applied rewrites89.6%
Taylor expanded in z around inf
Applied rewrites44.0%
if -2.1e13 < t Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6484.1
Applied rewrites84.1%
Taylor expanded in y around inf
Applied rewrites51.8%
Final simplification49.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (* i y) (+ a t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + (a + t);
}
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 = (i * y) + (a + t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + (a + t);
}
def code(x, y, z, t, a, b, c, i): return (i * y) + (a + t)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + Float64(a + t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (i * y) + (a + t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + \left(a + t\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.8
Applied rewrites85.8%
Taylor expanded in y around inf
Applied rewrites53.9%
Final simplification53.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* i y) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + a;
}
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 = (i * y) + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + a;
}
def code(x, y, z, t, a, b, c, i): return (i * y) + a
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (i * y) + a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + a
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.8
Applied rewrites85.8%
Taylor expanded in t around 0
Applied rewrites67.6%
Taylor expanded in y around inf
Applied rewrites35.6%
Final simplification35.6%
(FPCore (x y z t a b c i) :precision binary64 (* i y))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
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 = i * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
def code(x, y, z, t, a, b, c, i): return i * y
function code(x, y, z, t, a, b, c, i) return Float64(i * y) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = i * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y
\end{array}
Initial program 99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
Final simplification24.4%
herbie shell --seed 2024235
(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)))