
(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 (+ (+ (fma 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 (fma(x, log(y), z) + (t + a)) + (((b + -0.5) * log(c)) + (y * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
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) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
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) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
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) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
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) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -2.1e+127)
(+ (* y i) (+ z (fma x (log y) a)))
(if (<= x 3.6e+92)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))
(+ (* y i) (+ a (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -2.1e+127) {
tmp = (y * i) + (z + fma(x, log(y), a));
} else if (x <= 3.6e+92) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
} else {
tmp = (y * i) + (a + (z + (x * log(y))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -2.1e+127) tmp = Float64(Float64(y * i) + Float64(z + fma(x, log(y), a))); elseif (x <= 3.6e+92) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -2.1e+127], N[(N[(y * i), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+92], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+127}:\\
\;\;\;\;y \cdot i + \left(z + \mathsf{fma}\left(x, \log y, a\right)\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+92}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if x < -2.09999999999999992e127Initial program 99.6%
associate-+l+99.6%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in t around 0 89.5%
+-commutative89.5%
associate-+r+89.5%
+-commutative89.5%
fma-def89.5%
+-commutative89.5%
Simplified89.5%
if -2.09999999999999992e127 < x < 3.6e92Initial program 99.9%
Taylor expanded in x around 0 97.4%
if 3.6e92 < x Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in t around 0 89.3%
Final simplification94.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2e+164) (not (<= (- b 0.5) 2.5e+204))) (+ (* y i) (+ z (* b (log c)))) (+ (* y i) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -2e+164) || !((b - 0.5) <= 2.5e+204)) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
}
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 (((b - 0.5d0) <= (-2d+164)) .or. (.not. ((b - 0.5d0) <= 2.5d+204))) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = (y * i) + (a + (t + (z + (x * log(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 (((b - 0.5) <= -2e+164) || !((b - 0.5) <= 2.5e+204)) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -2e+164) or not ((b - 0.5) <= 2.5e+204): tmp = (y * i) + (z + (b * math.log(c))) else: tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -2e+164) || !(Float64(b - 0.5) <= 2.5e+204)) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -2e+164) || ~(((b - 0.5) <= 2.5e+204))) tmp = (y * i) + (z + (b * log(c))); else tmp = (y * i) + (a + (t + (z + (x * log(y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+164], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2.5e+204]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+164} \lor \neg \left(b - 0.5 \leq 2.5 \cdot 10^{+204}\right):\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2e164 or 2.50000000000000004e204 < (-.f64 b 1/2) Initial program 99.9%
Taylor expanded in t around 0 95.8%
+-commutative95.8%
associate-+l+95.8%
+-commutative95.8%
sub-neg95.8%
metadata-eval95.8%
associate-+r+95.8%
fma-def95.8%
fma-def95.8%
+-commutative95.8%
Simplified95.8%
Taylor expanded in b around inf 85.8%
*-commutative85.8%
Simplified85.8%
if -2e164 < (-.f64 b 1/2) < 2.50000000000000004e204Initial program 99.9%
Taylor expanded in b around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in b around 0 93.7%
Final simplification92.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2e+164) (not (<= (- b 0.5) 2.5e+204))) (+ (* y i) (+ z (* b (log c)))) (+ (* y i) (+ a (+ z (* x (log y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -2e+164) || !((b - 0.5) <= 2.5e+204)) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = (y * i) + (a + (z + (x * log(y))));
}
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 (((b - 0.5d0) <= (-2d+164)) .or. (.not. ((b - 0.5d0) <= 2.5d+204))) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = (y * i) + (a + (z + (x * log(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 (((b - 0.5) <= -2e+164) || !((b - 0.5) <= 2.5e+204)) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -2e+164) or not ((b - 0.5) <= 2.5e+204): tmp = (y * i) + (z + (b * math.log(c))) else: tmp = (y * i) + (a + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -2e+164) || !(Float64(b - 0.5) <= 2.5e+204)) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -2e+164) || ~(((b - 0.5) <= 2.5e+204))) tmp = (y * i) + (z + (b * log(c))); else tmp = (y * i) + (a + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+164], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2.5e+204]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+164} \lor \neg \left(b - 0.5 \leq 2.5 \cdot 10^{+204}\right):\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2e164 or 2.50000000000000004e204 < (-.f64 b 1/2) Initial program 99.9%
Taylor expanded in t around 0 95.8%
+-commutative95.8%
associate-+l+95.8%
+-commutative95.8%
sub-neg95.8%
metadata-eval95.8%
associate-+r+95.8%
fma-def95.8%
fma-def95.8%
+-commutative95.8%
Simplified95.8%
Taylor expanded in b around inf 85.8%
*-commutative85.8%
Simplified85.8%
if -2e164 < (-.f64 b 1/2) < 2.50000000000000004e204Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around 0 78.6%
Final simplification80.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.34e+132) (not (<= x 1.5e+91))) (+ (* y i) (+ a (+ z (* x (log y))))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.34e+132) || !(x <= 1.5e+91)) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
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 ((x <= (-1.34d+132)) .or. (.not. (x <= 1.5d+91))) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
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 <= -1.34e+132) || !(x <= 1.5e+91)) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.34e+132) or not (x <= 1.5e+91): tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.34e+132) || !(x <= 1.5e+91)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.34e+132) || ~((x <= 1.5e+91))) tmp = (y * i) + (a + (z + (x * log(y)))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.34e+132], N[Not[LessEqual[x, 1.5e+91]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.34 \cdot 10^{+132} \lor \neg \left(x \leq 1.5 \cdot 10^{+91}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.34000000000000002e132 or 1.50000000000000003e91 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in t around 0 89.4%
if -1.34000000000000002e132 < x < 1.50000000000000003e91Initial program 99.9%
Taylor expanded in x around 0 97.4%
Final simplification94.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -9e+126) (not (<= x 2.8e+90))) (+ (* y i) (+ a (+ z (* x (log y))))) (+ (* y i) (+ (* (+ b -0.5) (log c)) (+ z a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9e+126) || !(x <= 2.8e+90)) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = (y * i) + (((b + -0.5) * log(c)) + (z + a));
}
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 ((x <= (-9d+126)) .or. (.not. (x <= 2.8d+90))) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = (y * i) + (((b + (-0.5d0)) * log(c)) + (z + 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 <= -9e+126) || !(x <= 2.8e+90)) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (((b + -0.5) * Math.log(c)) + (z + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -9e+126) or not (x <= 2.8e+90): tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = (y * i) + (((b + -0.5) * math.log(c)) + (z + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -9e+126) || !(x <= 2.8e+90)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(z + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -9e+126) || ~((x <= 2.8e+90))) tmp = (y * i) + (a + (z + (x * log(y)))); else tmp = (y * i) + (((b + -0.5) * log(c)) + (z + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -9e+126], N[Not[LessEqual[x, 2.8e+90]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+126} \lor \neg \left(x \leq 2.8 \cdot 10^{+90}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b + -0.5\right) \cdot \log c + \left(z + a\right)\right)\\
\end{array}
\end{array}
if x < -8.99999999999999947e126 or 2.8e90 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in t around 0 89.4%
if -8.99999999999999947e126 < x < 2.8e90Initial program 99.9%
Taylor expanded in t around 0 82.6%
+-commutative82.6%
associate-+l+82.6%
+-commutative82.6%
sub-neg82.6%
metadata-eval82.6%
associate-+r+82.6%
fma-def82.6%
fma-def82.6%
+-commutative82.6%
Simplified82.6%
Taylor expanded in x around 0 80.5%
associate-+r+80.5%
sub-neg80.5%
metadata-eval80.5%
Simplified80.5%
Final simplification83.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 1.85e+101)
(+ (* y i) (+ z (* x (log y))))
(if (<= a 6.5e+209)
(+ (* y i) (+ a (* (log c) (- b 0.5))))
(+ (* y i) (+ z a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.85e+101) {
tmp = (y * i) + (z + (x * log(y)));
} else if (a <= 6.5e+209) {
tmp = (y * i) + (a + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
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 (a <= 1.85d+101) then
tmp = (y * i) + (z + (x * log(y)))
else if (a <= 6.5d+209) then
tmp = (y * i) + (a + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + 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 (a <= 1.85e+101) {
tmp = (y * i) + (z + (x * Math.log(y)));
} else if (a <= 6.5e+209) {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.85e+101: tmp = (y * i) + (z + (x * math.log(y))) elif a <= 6.5e+209: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.85e+101) tmp = Float64(Float64(y * i) + Float64(z + Float64(x * log(y)))); elseif (a <= 6.5e+209) tmp = Float64(Float64(y * i) + Float64(a + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.85e+101) tmp = (y * i) + (z + (x * log(y))); elseif (a <= 6.5e+209) tmp = (y * i) + (a + (log(c) * (b - 0.5))); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.85e+101], N[(N[(y * i), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+209], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.85 \cdot 10^{+101}:\\
\;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+209}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if a < 1.8499999999999999e101Initial program 99.9%
Taylor expanded in t around 0 85.0%
+-commutative85.0%
associate-+l+85.0%
+-commutative85.0%
sub-neg85.0%
metadata-eval85.0%
associate-+r+85.0%
fma-def85.0%
fma-def85.0%
+-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 60.1%
if 1.8499999999999999e101 < a < 6.49999999999999975e209Initial program 100.0%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
associate-+l+93.3%
+-commutative93.3%
sub-neg93.3%
metadata-eval93.3%
associate-+r+93.3%
fma-def93.3%
fma-def93.3%
+-commutative93.3%
Simplified93.3%
Taylor expanded in x around 0 93.3%
associate-+r+93.3%
sub-neg93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in z around 0 93.3%
if 6.49999999999999975e209 < a Initial program 99.9%
Taylor expanded in t around 0 95.2%
+-commutative95.2%
associate-+l+95.2%
+-commutative95.2%
sub-neg95.2%
metadata-eval95.2%
associate-+r+95.2%
fma-def95.2%
fma-def95.2%
+-commutative95.2%
Simplified95.2%
Taylor expanded in a around inf 90.2%
Final simplification64.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 2.1e+56)
(+ (* y i) (+ z (* x (log y))))
(if (or (<= a 5.7e+153) (not (<= a 1.95e+180)))
(+ (* y i) (+ z a))
(+ a (* (log c) (- b 0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.1e+56) {
tmp = (y * i) + (z + (x * log(y)));
} else if ((a <= 5.7e+153) || !(a <= 1.95e+180)) {
tmp = (y * i) + (z + a);
} else {
tmp = a + (log(c) * (b - 0.5));
}
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 (a <= 2.1d+56) then
tmp = (y * i) + (z + (x * log(y)))
else if ((a <= 5.7d+153) .or. (.not. (a <= 1.95d+180))) then
tmp = (y * i) + (z + a)
else
tmp = a + (log(c) * (b - 0.5d0))
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 (a <= 2.1e+56) {
tmp = (y * i) + (z + (x * Math.log(y)));
} else if ((a <= 5.7e+153) || !(a <= 1.95e+180)) {
tmp = (y * i) + (z + a);
} else {
tmp = a + (Math.log(c) * (b - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.1e+56: tmp = (y * i) + (z + (x * math.log(y))) elif (a <= 5.7e+153) or not (a <= 1.95e+180): tmp = (y * i) + (z + a) else: tmp = a + (math.log(c) * (b - 0.5)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.1e+56) tmp = Float64(Float64(y * i) + Float64(z + Float64(x * log(y)))); elseif ((a <= 5.7e+153) || !(a <= 1.95e+180)) tmp = Float64(Float64(y * i) + Float64(z + a)); else tmp = Float64(a + Float64(log(c) * Float64(b - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.1e+56) tmp = (y * i) + (z + (x * log(y))); elseif ((a <= 5.7e+153) || ~((a <= 1.95e+180))) tmp = (y * i) + (z + a); else tmp = a + (log(c) * (b - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.1e+56], N[(N[(y * i), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5.7e+153], N[Not[LessEqual[a, 1.95e+180]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{+56}:\\
\;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{+153} \lor \neg \left(a \leq 1.95 \cdot 10^{+180}\right):\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\
\end{array}
\end{array}
if a < 2.10000000000000017e56Initial program 99.9%
Taylor expanded in t around 0 85.1%
+-commutative85.1%
associate-+l+85.1%
+-commutative85.1%
sub-neg85.1%
metadata-eval85.1%
associate-+r+85.1%
fma-def85.1%
fma-def85.1%
+-commutative85.1%
Simplified85.1%
Taylor expanded in x around inf 60.3%
if 2.10000000000000017e56 < a < 5.69999999999999987e153 or 1.95e180 < a Initial program 99.9%
Taylor expanded in t around 0 91.1%
+-commutative91.1%
associate-+l+91.1%
+-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
associate-+r+91.1%
fma-def91.1%
fma-def91.1%
+-commutative91.1%
Simplified91.1%
Taylor expanded in a around inf 86.6%
if 5.69999999999999987e153 < a < 1.95e180Initial program 100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
associate-+r+100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-+r+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 100.0%
Final simplification65.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (+ z t_1)))
(if (<= x -3.8e+229)
t_2
(if (<= x -1.4e+207)
(+ (* y i) (+ z a))
(if (<= x -5.5e+185)
t_2
(if (<= x 7.5e+221) (+ (* y i) (+ t (+ z a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = z + t_1;
double tmp;
if (x <= -3.8e+229) {
tmp = t_2;
} else if (x <= -1.4e+207) {
tmp = (y * i) + (z + a);
} else if (x <= -5.5e+185) {
tmp = t_2;
} else if (x <= 7.5e+221) {
tmp = (y * i) + (t + (z + a));
} 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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = z + t_1
if (x <= (-3.8d+229)) then
tmp = t_2
else if (x <= (-1.4d+207)) then
tmp = (y * i) + (z + a)
else if (x <= (-5.5d+185)) then
tmp = t_2
else if (x <= 7.5d+221) then
tmp = (y * i) + (t + (z + a))
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 t_2 = z + t_1;
double tmp;
if (x <= -3.8e+229) {
tmp = t_2;
} else if (x <= -1.4e+207) {
tmp = (y * i) + (z + a);
} else if (x <= -5.5e+185) {
tmp = t_2;
} else if (x <= 7.5e+221) {
tmp = (y * i) + (t + (z + a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = z + t_1 tmp = 0 if x <= -3.8e+229: tmp = t_2 elif x <= -1.4e+207: tmp = (y * i) + (z + a) elif x <= -5.5e+185: tmp = t_2 elif x <= 7.5e+221: tmp = (y * i) + (t + (z + a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(z + t_1) tmp = 0.0 if (x <= -3.8e+229) tmp = t_2; elseif (x <= -1.4e+207) tmp = Float64(Float64(y * i) + Float64(z + a)); elseif (x <= -5.5e+185) tmp = t_2; elseif (x <= 7.5e+221) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); 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); t_2 = z + t_1; tmp = 0.0; if (x <= -3.8e+229) tmp = t_2; elseif (x <= -1.4e+207) tmp = (y * i) + (z + a); elseif (x <= -5.5e+185) tmp = t_2; elseif (x <= 7.5e+221) tmp = (y * i) + (t + (z + a)); 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]}, Block[{t$95$2 = N[(z + t$95$1), $MachinePrecision]}, If[LessEqual[x, -3.8e+229], t$95$2, If[LessEqual[x, -1.4e+207], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e+185], t$95$2, If[LessEqual[x, 7.5e+221], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := z + t_1\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{+207}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{+185}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+221}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -3.80000000000000018e229 or -1.40000000000000005e207 < x < -5.4999999999999996e185Initial program 99.3%
Taylor expanded in t around 0 91.9%
+-commutative91.9%
associate-+l+91.9%
+-commutative91.9%
sub-neg91.9%
metadata-eval91.9%
associate-+r+91.9%
fma-def91.9%
fma-def91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in x around inf 84.9%
Taylor expanded in y around 0 84.9%
if -3.80000000000000018e229 < x < -1.40000000000000005e207Initial program 100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
associate-+r+100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 87.6%
if -5.4999999999999996e185 < x < 7.50000000000000035e221Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in x around 0 78.5%
+-commutative78.5%
associate-+l+78.5%
Simplified78.5%
if 7.50000000000000035e221 < x Initial program 99.8%
Taylor expanded in t around 0 99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
fma-def99.8%
fma-def99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 96.9%
Taylor expanded in z around 0 96.9%
Taylor expanded in x around inf 74.4%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.6e+227)
(+ z t_1)
(if (<= x 3.2e+215) (+ (* y i) (+ t (+ z 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 <= -1.6e+227) {
tmp = z + t_1;
} else if (x <= 3.2e+215) {
tmp = (y * i) + (t + (z + a));
} else {
tmp = (y * i) + 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 <= (-1.6d+227)) then
tmp = z + t_1
else if (x <= 3.2d+215) then
tmp = (y * i) + (t + (z + a))
else
tmp = (y * i) + 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 <= -1.6e+227) {
tmp = z + t_1;
} else if (x <= 3.2e+215) {
tmp = (y * i) + (t + (z + a));
} else {
tmp = (y * i) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -1.6e+227: tmp = z + t_1 elif x <= 3.2e+215: tmp = (y * i) + (t + (z + a)) else: tmp = (y * i) + 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 <= -1.6e+227) tmp = Float64(z + t_1); elseif (x <= 3.2e+215) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); else tmp = Float64(Float64(y * i) + 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 <= -1.6e+227) tmp = z + t_1; elseif (x <= 3.2e+215) tmp = (y * i) + (t + (z + a)); else tmp = (y * i) + 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, -1.6e+227], N[(z + t$95$1), $MachinePrecision], If[LessEqual[x, 3.2e+215], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+227}:\\
\;\;\;\;z + t_1\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+215}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + t_1\\
\end{array}
\end{array}
if x < -1.59999999999999994e227Initial program 99.4%
Taylor expanded in t around 0 97.1%
+-commutative97.1%
associate-+l+97.1%
+-commutative97.1%
sub-neg97.1%
metadata-eval97.1%
associate-+r+97.1%
fma-def97.1%
fma-def97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around inf 83.2%
Taylor expanded in y around 0 83.2%
if -1.59999999999999994e227 < x < 3.1999999999999999e215Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in x around 0 77.2%
+-commutative77.2%
associate-+l+77.2%
Simplified77.2%
if 3.1999999999999999e215 < x Initial program 99.8%
Taylor expanded in t around 0 99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
fma-def99.8%
fma-def99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 97.3%
Taylor expanded in z around 0 97.3%
Final simplification78.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5e+250) (not (<= x 1.35e+223))) (* x (log y)) (+ (* y i) (+ t (+ z a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5e+250) || !(x <= 1.35e+223)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (t + (z + a));
}
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 ((x <= (-5d+250)) .or. (.not. (x <= 1.35d+223))) then
tmp = x * log(y)
else
tmp = (y * i) + (t + (z + 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 <= -5e+250) || !(x <= 1.35e+223)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (t + (z + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5e+250) or not (x <= 1.35e+223): tmp = x * math.log(y) else: tmp = (y * i) + (t + (z + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5e+250) || !(x <= 1.35e+223)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5e+250) || ~((x <= 1.35e+223))) tmp = x * log(y); else tmp = (y * i) + (t + (z + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5e+250], N[Not[LessEqual[x, 1.35e+223]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+250} \lor \neg \left(x \leq 1.35 \cdot 10^{+223}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if x < -5.0000000000000002e250 or 1.35e223 < x Initial program 99.7%
Taylor expanded in t around 0 98.9%
+-commutative98.9%
associate-+l+98.9%
+-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
associate-+r+98.9%
fma-def98.9%
fma-def98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in x around inf 96.4%
Taylor expanded in z around 0 96.4%
Taylor expanded in x around inf 80.4%
if -5.0000000000000002e250 < x < 1.35e223Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in x around 0 77.4%
+-commutative77.4%
associate-+l+77.4%
Simplified77.4%
Final simplification77.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ t (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (t + (z + 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 = (y * i) + (t + (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 (y * i) + (t + (z + a));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (t + (z + a))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(t + Float64(z + a))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (t + (z + a)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(t + \left(z + a\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in x around 0 72.0%
+-commutative72.0%
associate-+l+72.0%
Simplified72.0%
Final simplification72.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.4e+79) (+ z (* 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 (z <= -3.4e+79) {
tmp = z + (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 (z <= (-3.4d+79)) then
tmp = z + (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 (z <= -3.4e+79) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.4e+79: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.4e+79) tmp = Float64(z + 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 (z <= -3.4e+79) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.4e+79], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+79}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -3.40000000000000032e79Initial program 99.9%
Taylor expanded in t around 0 98.7%
+-commutative98.7%
associate-+l+98.7%
+-commutative98.7%
sub-neg98.7%
metadata-eval98.7%
associate-+r+98.7%
fma-def98.7%
fma-def98.7%
+-commutative98.7%
Simplified98.7%
Taylor expanded in z around inf 61.9%
if -3.40000000000000032e79 < z Initial program 99.9%
Taylor expanded in a around inf 46.6%
Final simplification49.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + 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 = (y * i) + (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 (y * i) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 86.3%
+-commutative86.3%
associate-+l+86.3%
+-commutative86.3%
sub-neg86.3%
metadata-eval86.3%
associate-+r+86.3%
fma-def86.3%
fma-def86.3%
+-commutative86.3%
Simplified86.3%
Taylor expanded in a around inf 59.2%
Final simplification59.2%
(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.9%
Taylor expanded in a around inf 43.3%
Final simplification43.3%
(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.9%
Taylor expanded in a around inf 43.3%
Taylor expanded in a around 0 27.0%
*-commutative27.0%
Simplified27.0%
Final simplification27.0%
herbie shell --seed 2023333
(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)))