
(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 14 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 (+ t (fma y i (fma x (log y) (+ a (fma (+ b -0.5) (log c) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t + fma(y, i, fma(x, log(y), (a + fma((b + -0.5), log(c), z))));
}
function code(x, y, z, t, a, b, c, i) return Float64(t + fma(y, i, fma(x, log(y), Float64(a + fma(Float64(b + -0.5), log(c), z))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t + N[(y * i + N[(x * N[Log[y], $MachinePrecision] + N[(a + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(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%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (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 + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(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] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -4e+159) (not (<= (- b 0.5) 5e+113))) (+ (+ (* (+ b -0.5) (log c)) (* y i)) (+ z (+ t a))) (+ t (+ (* x (log y)) (+ a (+ z (* y i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -4e+159) || !((b - 0.5) <= 5e+113)) {
tmp = (((b + -0.5) * log(c)) + (y * i)) + (z + (t + a));
} else {
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5d0) <= (-4d+159)) .or. (.not. ((b - 0.5d0) <= 5d+113))) then
tmp = (((b + (-0.5d0)) * log(c)) + (y * i)) + (z + (t + a))
else
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5) <= -4e+159) || !((b - 0.5) <= 5e+113)) {
tmp = (((b + -0.5) * Math.log(c)) + (y * i)) + (z + (t + a));
} else {
tmp = t + ((x * Math.log(y)) + (a + (z + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -4e+159) or not ((b - 0.5) <= 5e+113): tmp = (((b + -0.5) * math.log(c)) + (y * i)) + (z + (t + a)) else: tmp = t + ((x * math.log(y)) + (a + (z + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -4e+159) || !(Float64(b - 0.5) <= 5e+113)) tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i)) + Float64(z + Float64(t + a))); else tmp = Float64(t + Float64(Float64(x * log(y)) + Float64(a + Float64(z + Float64(y * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -4e+159) || ~(((b - 0.5) <= 5e+113))) tmp = (((b + -0.5) * log(c)) + (y * i)) + (z + (t + a)); else tmp = t + ((x * log(y)) + (a + (z + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+159], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+113]], $MachinePrecision]], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+159} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+113}\right):\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(x \cdot \log y + \left(a + \left(z + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -3.9999999999999997e159 or 5e113 < (-.f64 b 1/2) Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 95.4%
associate-+r+95.4%
+-commutative95.4%
Simplified95.4%
if -3.9999999999999997e159 < (-.f64 b 1/2) < 5e113Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 97.6%
fma-udef97.6%
+-commutative97.6%
Applied egg-rr97.6%
Taylor expanded in a around inf 97.6%
Final simplification97.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -1.95e+159) (not (<= (- b 0.5) 6e+171))) (+ (* (log c) (- b 0.5)) (+ a z)) (+ t (+ (* x (log y)) (+ a (+ z (* y i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -1.95e+159) || !((b - 0.5) <= 6e+171)) {
tmp = (log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5d0) <= (-1.95d+159)) .or. (.not. ((b - 0.5d0) <= 6d+171))) then
tmp = (log(c) * (b - 0.5d0)) + (a + z)
else
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5) <= -1.95e+159) || !((b - 0.5) <= 6e+171)) {
tmp = (Math.log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + ((x * Math.log(y)) + (a + (z + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -1.95e+159) or not ((b - 0.5) <= 6e+171): tmp = (math.log(c) * (b - 0.5)) + (a + z) else: tmp = t + ((x * math.log(y)) + (a + (z + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -1.95e+159) || !(Float64(b - 0.5) <= 6e+171)) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)); else tmp = Float64(t + Float64(Float64(x * log(y)) + Float64(a + Float64(z + Float64(y * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -1.95e+159) || ~(((b - 0.5) <= 6e+171))) tmp = (log(c) * (b - 0.5)) + (a + z); else tmp = t + ((x * log(y)) + (a + (z + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -1.95e+159], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 6e+171]], $MachinePrecision]], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1.95 \cdot 10^{+159} \lor \neg \left(b - 0.5 \leq 6 \cdot 10^{+171}\right):\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(x \cdot \log y + \left(a + \left(z + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -1.95e159 or 6.0000000000000002e171 < (-.f64 b 1/2) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 96.0%
associate-+r+96.0%
+-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 79.0%
Taylor expanded in t around 0 77.7%
if -1.95e159 < (-.f64 b 1/2) < 6.0000000000000002e171Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 96.8%
fma-udef96.8%
+-commutative96.8%
Applied egg-rr96.8%
Taylor expanded in a around inf 96.8%
Final simplification92.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -4e+159) (not (<= (- b 0.5) 2e+150))) (+ (+ (* (+ b -0.5) (log c)) (* y i)) (+ t z)) (+ t (+ (* x (log y)) (+ a (+ z (* y i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -4e+159) || !((b - 0.5) <= 2e+150)) {
tmp = (((b + -0.5) * log(c)) + (y * i)) + (t + z);
} else {
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5d0) <= (-4d+159)) .or. (.not. ((b - 0.5d0) <= 2d+150))) then
tmp = (((b + (-0.5d0)) * log(c)) + (y * i)) + (t + z)
else
tmp = t + ((x * log(y)) + (a + (z + (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 (((b - 0.5) <= -4e+159) || !((b - 0.5) <= 2e+150)) {
tmp = (((b + -0.5) * Math.log(c)) + (y * i)) + (t + z);
} else {
tmp = t + ((x * Math.log(y)) + (a + (z + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -4e+159) or not ((b - 0.5) <= 2e+150): tmp = (((b + -0.5) * math.log(c)) + (y * i)) + (t + z) else: tmp = t + ((x * math.log(y)) + (a + (z + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -4e+159) || !(Float64(b - 0.5) <= 2e+150)) tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i)) + Float64(t + z)); else tmp = Float64(t + Float64(Float64(x * log(y)) + Float64(a + Float64(z + Float64(y * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -4e+159) || ~(((b - 0.5) <= 2e+150))) tmp = (((b + -0.5) * log(c)) + (y * i)) + (t + z); else tmp = t + ((x * log(y)) + (a + (z + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+159], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+150]], $MachinePrecision]], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+159} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+150}\right):\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) + \left(t + z\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(x \cdot \log y + \left(a + \left(z + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -3.9999999999999997e159 or 1.99999999999999996e150 < (-.f64 b 1/2) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 96.1%
associate-+r+96.1%
+-commutative96.1%
Simplified96.1%
Taylor expanded in a around 0 86.4%
if -3.9999999999999997e159 < (-.f64 b 1/2) < 1.99999999999999996e150Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 96.8%
fma-udef96.8%
+-commutative96.8%
Applied egg-rr96.8%
Taylor expanded in a around inf 96.8%
Final simplification94.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (+ (* x (log y)) (* y i)))))
(if (<= x -1.52e+181)
t_1
(if (<= x -27000.0)
(+ (* (log c) (- b 0.5)) (+ a z))
(if (<= x 1.55e+183) (+ t (+ (* y i) (+ a z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t + ((x * log(y)) + (y * i));
double tmp;
if (x <= -1.52e+181) {
tmp = t_1;
} else if (x <= -27000.0) {
tmp = (log(c) * (b - 0.5)) + (a + z);
} else if (x <= 1.55e+183) {
tmp = t + ((y * i) + (a + z));
} 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 = t + ((x * log(y)) + (y * i))
if (x <= (-1.52d+181)) then
tmp = t_1
else if (x <= (-27000.0d0)) then
tmp = (log(c) * (b - 0.5d0)) + (a + z)
else if (x <= 1.55d+183) then
tmp = t + ((y * i) + (a + z))
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 = t + ((x * Math.log(y)) + (y * i));
double tmp;
if (x <= -1.52e+181) {
tmp = t_1;
} else if (x <= -27000.0) {
tmp = (Math.log(c) * (b - 0.5)) + (a + z);
} else if (x <= 1.55e+183) {
tmp = t + ((y * i) + (a + z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t + ((x * math.log(y)) + (y * i)) tmp = 0 if x <= -1.52e+181: tmp = t_1 elif x <= -27000.0: tmp = (math.log(c) * (b - 0.5)) + (a + z) elif x <= 1.55e+183: tmp = t + ((y * i) + (a + z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(Float64(x * log(y)) + Float64(y * i))) tmp = 0.0 if (x <= -1.52e+181) tmp = t_1; elseif (x <= -27000.0) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)); elseif (x <= 1.55e+183) tmp = Float64(t + Float64(Float64(y * i) + Float64(a + z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t + ((x * log(y)) + (y * i)); tmp = 0.0; if (x <= -1.52e+181) tmp = t_1; elseif (x <= -27000.0) tmp = (log(c) * (b - 0.5)) + (a + z); elseif (x <= 1.55e+183) tmp = t + ((y * i) + (a + z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.52e+181], t$95$1, If[LessEqual[x, -27000.0], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+183], N[(t + N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x \cdot \log y + y \cdot i\right)\\
\mathbf{if}\;x \leq -1.52 \cdot 10^{+181}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -27000:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+183}:\\
\;\;\;\;t + \left(y \cdot i + \left(a + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.52e181 or 1.5499999999999999e183 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 74.7%
Taylor expanded in y around 0 74.7%
if -1.52e181 < x < -27000Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 93.3%
associate-+r+93.3%
+-commutative93.3%
Simplified93.3%
Taylor expanded in y around 0 79.8%
Taylor expanded in t around 0 58.0%
if -27000 < x < 1.5499999999999999e183Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 85.2%
fma-udef85.2%
+-commutative85.2%
Applied egg-rr85.2%
Taylor expanded in x around 0 82.7%
associate-+r+82.7%
*-commutative82.7%
Simplified82.7%
Final simplification76.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -7.5e+205)
(+ t (+ (* y i) (+ a z)))
(if (<= z -9.5e+107)
(+ (* (log c) (- b 0.5)) (+ a z))
(+ t (+ (* x (log y)) (+ 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 <= -7.5e+205) {
tmp = t + ((y * i) + (a + z));
} else if (z <= -9.5e+107) {
tmp = (log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + ((x * log(y)) + (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 <= (-7.5d+205)) then
tmp = t + ((y * i) + (a + z))
else if (z <= (-9.5d+107)) then
tmp = (log(c) * (b - 0.5d0)) + (a + z)
else
tmp = t + ((x * log(y)) + (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 <= -7.5e+205) {
tmp = t + ((y * i) + (a + z));
} else if (z <= -9.5e+107) {
tmp = (Math.log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + ((x * Math.log(y)) + (a + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7.5e+205: tmp = t + ((y * i) + (a + z)) elif z <= -9.5e+107: tmp = (math.log(c) * (b - 0.5)) + (a + z) else: tmp = t + ((x * math.log(y)) + (a + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.5e+205) tmp = Float64(t + Float64(Float64(y * i) + Float64(a + z))); elseif (z <= -9.5e+107) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)); else tmp = Float64(t + Float64(Float64(x * log(y)) + 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 <= -7.5e+205) tmp = t + ((y * i) + (a + z)); elseif (z <= -9.5e+107) tmp = (log(c) * (b - 0.5)) + (a + z); else tmp = t + ((x * log(y)) + (a + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.5e+205], N[(t + N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e+107], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+205}:\\
\;\;\;\;t + \left(y \cdot i + \left(a + z\right)\right)\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(x \cdot \log y + \left(a + y \cdot i\right)\right)\\
\end{array}
\end{array}
if z < -7.5000000000000003e205Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-def100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 95.9%
fma-udef95.9%
+-commutative95.9%
Applied egg-rr95.9%
Taylor expanded in x around 0 92.3%
associate-+r+92.3%
*-commutative92.3%
Simplified92.3%
if -7.5000000000000003e205 < z < -9.50000000000000019e107Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 91.3%
associate-+r+91.3%
+-commutative91.3%
Simplified91.3%
Taylor expanded in y around 0 77.0%
Taylor expanded in t around 0 70.7%
if -9.50000000000000019e107 < z Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 85.4%
fma-udef85.4%
+-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in z around 0 75.5%
Final simplification76.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= z -4.9e+166)
(+ t (+ t_1 (+ z (* y i))))
(if (<= z -5.8e+109)
(+ (* (log c) (- b 0.5)) (+ a z))
(+ t (+ t_1 (+ a (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (z <= -4.9e+166) {
tmp = t + (t_1 + (z + (y * i)));
} else if (z <= -5.8e+109) {
tmp = (log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + (t_1 + (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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (z <= (-4.9d+166)) then
tmp = t + (t_1 + (z + (y * i)))
else if (z <= (-5.8d+109)) then
tmp = (log(c) * (b - 0.5d0)) + (a + z)
else
tmp = t + (t_1 + (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 t_1 = x * Math.log(y);
double tmp;
if (z <= -4.9e+166) {
tmp = t + (t_1 + (z + (y * i)));
} else if (z <= -5.8e+109) {
tmp = (Math.log(c) * (b - 0.5)) + (a + z);
} else {
tmp = t + (t_1 + (a + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if z <= -4.9e+166: tmp = t + (t_1 + (z + (y * i))) elif z <= -5.8e+109: tmp = (math.log(c) * (b - 0.5)) + (a + z) else: tmp = t + (t_1 + (a + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (z <= -4.9e+166) tmp = Float64(t + Float64(t_1 + Float64(z + Float64(y * i)))); elseif (z <= -5.8e+109) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)); else tmp = Float64(t + Float64(t_1 + Float64(a + Float64(y * i)))); 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 (z <= -4.9e+166) tmp = t + (t_1 + (z + (y * i))); elseif (z <= -5.8e+109) tmp = (log(c) * (b - 0.5)) + (a + z); else tmp = t + (t_1 + (a + (y * i))); 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[z, -4.9e+166], N[(t + N[(t$95$1 + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e+109], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(t + N[(t$95$1 + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;z \leq -4.9 \cdot 10^{+166}:\\
\;\;\;\;t + \left(t_1 + \left(z + y \cdot i\right)\right)\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{+109}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(t_1 + \left(a + y \cdot i\right)\right)\\
\end{array}
\end{array}
if z < -4.89999999999999969e166Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-def100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 84.8%
fma-udef84.8%
+-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in a around 0 83.8%
if -4.89999999999999969e166 < z < -5.8e109Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 99.5%
associate-+r+99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in y around 0 90.5%
Taylor expanded in t around 0 81.4%
if -5.8e109 < z Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 85.4%
fma-udef85.4%
+-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in z around 0 75.5%
Final simplification76.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.7e+185) (not (<= x 4.2e+183))) (+ t (+ (* x (log y)) (* y i))) (+ t (+ (* y i) (+ a z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.7e+185) || !(x <= 4.2e+183)) {
tmp = t + ((x * log(y)) + (y * i));
} else {
tmp = t + ((y * i) + (a + z));
}
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.7d+185)) .or. (.not. (x <= 4.2d+183))) then
tmp = t + ((x * log(y)) + (y * i))
else
tmp = t + ((y * i) + (a + z))
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.7e+185) || !(x <= 4.2e+183)) {
tmp = t + ((x * Math.log(y)) + (y * i));
} else {
tmp = t + ((y * i) + (a + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.7e+185) or not (x <= 4.2e+183): tmp = t + ((x * math.log(y)) + (y * i)) else: tmp = t + ((y * i) + (a + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.7e+185) || !(x <= 4.2e+183)) tmp = Float64(t + Float64(Float64(x * log(y)) + Float64(y * i))); else tmp = Float64(t + Float64(Float64(y * i) + Float64(a + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.7e+185) || ~((x <= 4.2e+183))) tmp = t + ((x * log(y)) + (y * i)); else tmp = t + ((y * i) + (a + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.7e+185], N[Not[LessEqual[x, 4.2e+183]], $MachinePrecision]], N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+185} \lor \neg \left(x \leq 4.2 \cdot 10^{+183}\right):\\
\;\;\;\;t + \left(x \cdot \log y + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(y \cdot i + \left(a + z\right)\right)\\
\end{array}
\end{array}
if x < -1.70000000000000009e185 or 4.2e183 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 74.7%
Taylor expanded in y around 0 74.7%
if -1.70000000000000009e185 < x < 4.2e183Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 82.9%
fma-udef82.9%
+-commutative82.9%
Applied egg-rr82.9%
Taylor expanded in x around 0 79.5%
associate-+r+79.5%
*-commutative79.5%
Simplified79.5%
Final simplification78.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.7e+267) (not (<= x 4.8e+228))) (* x (log y)) (+ t (+ (* y i) (+ a z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.7e+267) || !(x <= 4.8e+228)) {
tmp = x * log(y);
} else {
tmp = t + ((y * i) + (a + z));
}
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 <= (-2.7d+267)) .or. (.not. (x <= 4.8d+228))) then
tmp = x * log(y)
else
tmp = t + ((y * i) + (a + z))
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 <= -2.7e+267) || !(x <= 4.8e+228)) {
tmp = x * Math.log(y);
} else {
tmp = t + ((y * i) + (a + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.7e+267) or not (x <= 4.8e+228): tmp = x * math.log(y) else: tmp = t + ((y * i) + (a + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.7e+267) || !(x <= 4.8e+228)) tmp = Float64(x * log(y)); else tmp = Float64(t + Float64(Float64(y * i) + Float64(a + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.7e+267) || ~((x <= 4.8e+228))) tmp = x * log(y); else tmp = t + ((y * i) + (a + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.7e+267], N[Not[LessEqual[x, 4.8e+228]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+267} \lor \neg \left(x \leq 4.8 \cdot 10^{+228}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;t + \left(y \cdot i + \left(a + z\right)\right)\\
\end{array}
\end{array}
if x < -2.7000000000000001e267 or 4.79999999999999977e228 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in y around 0 81.6%
Taylor expanded in t around 0 81.6%
if -2.7000000000000001e267 < x < 4.79999999999999977e228Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 83.4%
fma-udef83.4%
+-commutative83.4%
Applied egg-rr83.4%
Taylor expanded in x around 0 75.3%
associate-+r+75.3%
*-commutative75.3%
Simplified75.3%
Final simplification76.0%
(FPCore (x y z t a b c i) :precision binary64 (+ t (+ (* y i) (+ a z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t + ((y * i) + (a + z));
}
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 = t + ((y * i) + (a + z))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t + ((y * i) + (a + z));
}
def code(x, y, z, t, a, b, c, i): return t + ((y * i) + (a + z))
function code(x, y, z, t, a, b, c, i) return Float64(t + Float64(Float64(y * i) + Float64(a + z))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = t + ((y * i) + (a + z)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t + N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \left(y \cdot i + \left(a + z\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 84.8%
fma-udef84.8%
+-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in x around 0 69.2%
associate-+r+69.2%
*-commutative69.2%
Simplified69.2%
Final simplification69.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.9e+99) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.9e+99) {
tmp = z;
} else {
tmp = 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 (z <= (-2.9d+99)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.9e+99) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.9e+99: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.9e+99) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.9e+99) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.9e+99], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+99}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.9000000000000002e99Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 94.3%
associate-+r+94.3%
+-commutative94.3%
Simplified94.3%
Taylor expanded in z around inf 50.0%
if -2.9000000000000002e99 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 82.2%
associate-+r+82.2%
+-commutative82.2%
Simplified82.2%
Taylor expanded in a around inf 17.8%
Final simplification23.5%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 84.3%
associate-+r+84.3%
+-commutative84.3%
Simplified84.3%
Taylor expanded in a around inf 16.0%
Final simplification16.0%
herbie shell --seed 2023200
(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)))