
(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 19 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 (+ (+ (* (- b 0.5) (log c)) (+ a (+ t (+ (* x (log y)) z)))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((b - 0.5) * log(c)) + (a + (t + ((x * log(y)) + z)))) + (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 = (((b - 0.5d0) * log(c)) + (a + (t + ((x * log(y)) + z)))) + (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 (((b - 0.5) * Math.log(c)) + (a + (t + ((x * Math.log(y)) + z)))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((b - 0.5) * math.log(c)) + (a + (t + ((x * math.log(y)) + z)))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((b - 0.5) * log(c)) + (a + (t + ((x * log(y)) + z)))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\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
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= i -6.4)
(fma y i (+ a (+ t (+ z t_1))))
(if (<= i 6e+39)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(+ (* y i) (+ (* b (log c)) (+ a (+ z t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (i <= -6.4) {
tmp = fma(y, i, (a + (t + (z + t_1))));
} else if (i <= 6e+39) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (i <= -6.4) tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); elseif (i <= 6e+39) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.4], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 6e+39], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;i \leq -6.4:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\mathbf{elif}\;i \leq 6 \cdot 10^{+39}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if i < -6.4000000000000004Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 93.8%
if -6.4000000000000004 < i < 5.9999999999999999e39Initial program 99.8%
Taylor expanded in y around 0 97.5%
if 5.9999999999999999e39 < i Initial program 99.9%
Taylor expanded in x around 0 96.1%
Taylor expanded in b around inf 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification96.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.4e+158) (not (<= x 3.25e+212))) (+ a (+ t (+ (* x (log y)) z))) (fma y i (+ a (+ t (+ z (* (- b 0.5) (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.4e+158) || !(x <= 3.25e+212)) {
tmp = a + (t + ((x * log(y)) + z));
} else {
tmp = fma(y, i, (a + (t + (z + ((b - 0.5) * log(c))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.4e+158) || !(x <= 3.25e+212)) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(Float64(b - 0.5) * log(c)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.4e+158], N[Not[LessEqual[x, 3.25e+212]], $MachinePrecision]], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+158} \lor \neg \left(x \leq 3.25 \cdot 10^{+212}\right):\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.39999999999999957e158 or 3.24999999999999999e212 < x Initial program 99.8%
Taylor expanded in y around 0 87.3%
Taylor expanded in x around inf 81.3%
if -5.39999999999999957e158 < x < 3.24999999999999999e212Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
Final simplification92.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* b (log c)) (+ a (+ t (+ (* x (log y)) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + (t + ((x * log(y)) + 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 = (y * i) + ((b * log(c)) + (a + (t + ((x * log(y)) + z))))
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) + ((b * Math.log(c)) + (a + (t + ((x * Math.log(y)) + z))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + (t + ((x * math.log(y)) + z))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((b * log(c)) + (a + (t + ((x * log(y)) + z)))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 98.7%
*-commutative85.4%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* b (log c)) (+ a (+ (* x (log y)) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + ((x * log(y)) + 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 = (y * i) + ((b * log(c)) + (a + ((x * log(y)) + z)))
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) + ((b * Math.log(c)) + (a + ((x * Math.log(y)) + z)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + ((x * math.log(y)) + z)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(Float64(x * log(y)) + z)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((b * log(c)) + (a + ((x * log(y)) + z))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(x \cdot \log y + z\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 98.7%
*-commutative85.4%
Simplified98.7%
Taylor expanded in t around 0 82.6%
Final simplification82.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (+ b -0.5)))
(t_2 (+ (* y i) (+ (+ a (+ z t)) (* (log c) -0.5)))))
(if (<= b -2.8e+36)
(+ (* y i) (+ (+ t a) t_1))
(if (<= b 2.9e-162)
t_2
(if (<= b 2.1e-74)
(+ a (+ t (+ (* x (log y)) z)))
(if (<= b 2.4e-29) t_2 (+ a (+ (+ z t) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b + -0.5);
double t_2 = (y * i) + ((a + (z + t)) + (log(c) * -0.5));
double tmp;
if (b <= -2.8e+36) {
tmp = (y * i) + ((t + a) + t_1);
} else if (b <= 2.9e-162) {
tmp = t_2;
} else if (b <= 2.1e-74) {
tmp = a + (t + ((x * log(y)) + z));
} else if (b <= 2.4e-29) {
tmp = t_2;
} else {
tmp = a + ((z + t) + 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 = log(c) * (b + (-0.5d0))
t_2 = (y * i) + ((a + (z + t)) + (log(c) * (-0.5d0)))
if (b <= (-2.8d+36)) then
tmp = (y * i) + ((t + a) + t_1)
else if (b <= 2.9d-162) then
tmp = t_2
else if (b <= 2.1d-74) then
tmp = a + (t + ((x * log(y)) + z))
else if (b <= 2.4d-29) then
tmp = t_2
else
tmp = a + ((z + t) + 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 = Math.log(c) * (b + -0.5);
double t_2 = (y * i) + ((a + (z + t)) + (Math.log(c) * -0.5));
double tmp;
if (b <= -2.8e+36) {
tmp = (y * i) + ((t + a) + t_1);
} else if (b <= 2.9e-162) {
tmp = t_2;
} else if (b <= 2.1e-74) {
tmp = a + (t + ((x * Math.log(y)) + z));
} else if (b <= 2.4e-29) {
tmp = t_2;
} else {
tmp = a + ((z + t) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b + -0.5) t_2 = (y * i) + ((a + (z + t)) + (math.log(c) * -0.5)) tmp = 0 if b <= -2.8e+36: tmp = (y * i) + ((t + a) + t_1) elif b <= 2.9e-162: tmp = t_2 elif b <= 2.1e-74: tmp = a + (t + ((x * math.log(y)) + z)) elif b <= 2.4e-29: tmp = t_2 else: tmp = a + ((z + t) + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b + -0.5)) t_2 = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(log(c) * -0.5))) tmp = 0.0 if (b <= -2.8e+36) tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + t_1)); elseif (b <= 2.9e-162) tmp = t_2; elseif (b <= 2.1e-74) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); elseif (b <= 2.4e-29) tmp = t_2; else tmp = Float64(a + Float64(Float64(z + t) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b + -0.5); t_2 = (y * i) + ((a + (z + t)) + (log(c) * -0.5)); tmp = 0.0; if (b <= -2.8e+36) tmp = (y * i) + ((t + a) + t_1); elseif (b <= 2.9e-162) tmp = t_2; elseif (b <= 2.1e-74) tmp = a + (t + ((x * log(y)) + z)); elseif (b <= 2.4e-29) tmp = t_2; else tmp = a + ((z + t) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.8e+36], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-162], t$95$2, If[LessEqual[b, 2.1e-74], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-29], t$95$2, N[(a + N[(N[(z + t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b + -0.5\right)\\
t_2 := y \cdot i + \left(\left(a + \left(z + t\right)\right) + \log c \cdot -0.5\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+36}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + t\_1\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-74}:\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a + \left(\left(z + t\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -2.8000000000000001e36Initial program 99.7%
Taylor expanded in x around 0 92.5%
Taylor expanded in z around 0 83.4%
associate-+r+83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
if -2.8000000000000001e36 < b < 2.9000000000000001e-162 or 2.1e-74 < b < 2.39999999999999992e-29Initial program 99.9%
Taylor expanded in x around 0 85.4%
Taylor expanded in b around 0 84.6%
if 2.9000000000000001e-162 < b < 2.1e-74Initial program 100.0%
Taylor expanded in y around 0 88.9%
Taylor expanded in x around inf 88.9%
if 2.39999999999999992e-29 < b Initial program 99.9%
Taylor expanded in x around 0 92.2%
add-cbrt-cube38.6%
pow338.6%
sub-neg38.6%
metadata-eval38.6%
*-commutative38.6%
Applied egg-rr38.6%
Taylor expanded in y around 0 83.6%
associate-+r+83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
Simplified83.6%
Final simplification84.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ (+ z t) (* (log c) (+ b -0.5)))))
(t_2 (+ a (+ t (+ (* x (log y)) z)))))
(if (<= x -9.2e+70)
t_2
(if (<= x -2.9e-6)
t_1
(if (<= x -8.8e-123) (+ a (* y i)) (if (<= x 2e+70) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + ((z + t) + (log(c) * (b + -0.5)));
double t_2 = a + (t + ((x * log(y)) + z));
double tmp;
if (x <= -9.2e+70) {
tmp = t_2;
} else if (x <= -2.9e-6) {
tmp = t_1;
} else if (x <= -8.8e-123) {
tmp = a + (y * i);
} else if (x <= 2e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = a + ((z + t) + (log(c) * (b + (-0.5d0))))
t_2 = a + (t + ((x * log(y)) + z))
if (x <= (-9.2d+70)) then
tmp = t_2
else if (x <= (-2.9d-6)) then
tmp = t_1
else if (x <= (-8.8d-123)) then
tmp = a + (y * i)
else if (x <= 2d+70) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + ((z + t) + (Math.log(c) * (b + -0.5)));
double t_2 = a + (t + ((x * Math.log(y)) + z));
double tmp;
if (x <= -9.2e+70) {
tmp = t_2;
} else if (x <= -2.9e-6) {
tmp = t_1;
} else if (x <= -8.8e-123) {
tmp = a + (y * i);
} else if (x <= 2e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + ((z + t) + (math.log(c) * (b + -0.5))) t_2 = a + (t + ((x * math.log(y)) + z)) tmp = 0 if x <= -9.2e+70: tmp = t_2 elif x <= -2.9e-6: tmp = t_1 elif x <= -8.8e-123: tmp = a + (y * i) elif x <= 2e+70: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))) t_2 = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) tmp = 0.0 if (x <= -9.2e+70) tmp = t_2; elseif (x <= -2.9e-6) tmp = t_1; elseif (x <= -8.8e-123) tmp = Float64(a + Float64(y * i)); elseif (x <= 2e+70) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + ((z + t) + (log(c) * (b + -0.5))); t_2 = a + (t + ((x * log(y)) + z)); tmp = 0.0; if (x <= -9.2e+70) tmp = t_2; elseif (x <= -2.9e-6) tmp = t_1; elseif (x <= -8.8e-123) tmp = a + (y * i); elseif (x <= 2e+70) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.2e+70], t$95$2, If[LessEqual[x, -2.9e-6], t$95$1, If[LessEqual[x, -8.8e-123], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+70], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
t_2 := a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;a + y \cdot i\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -9.19999999999999975e70 or 2.00000000000000015e70 < x Initial program 99.7%
Taylor expanded in y around 0 79.8%
Taylor expanded in x around inf 69.9%
if -9.19999999999999975e70 < x < -2.9000000000000002e-6 or -8.80000000000000025e-123 < x < 2.00000000000000015e70Initial program 99.9%
Taylor expanded in x around 0 99.4%
add-cbrt-cube68.0%
pow368.0%
sub-neg68.0%
metadata-eval68.0%
*-commutative68.0%
Applied egg-rr68.0%
Taylor expanded in y around 0 86.1%
associate-+r+86.1%
sub-neg86.1%
metadata-eval86.1%
+-commutative86.1%
Simplified86.1%
if -2.9000000000000002e-6 < x < -8.80000000000000025e-123Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around inf 64.0%
Final simplification79.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ (+ z t) (* (log c) (+ b -0.5)))))
(t_2 (+ a (+ t (+ (* x (log y)) z)))))
(if (<= x -3.3e+70)
t_2
(if (<= x -2.9e-6)
t_1
(if (<= x -8.8e-123)
(+ (* y i) (+ a (+ t (* (log c) -0.5))))
(if (<= x 6.2e+70) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + ((z + t) + (log(c) * (b + -0.5)));
double t_2 = a + (t + ((x * log(y)) + z));
double tmp;
if (x <= -3.3e+70) {
tmp = t_2;
} else if (x <= -2.9e-6) {
tmp = t_1;
} else if (x <= -8.8e-123) {
tmp = (y * i) + (a + (t + (log(c) * -0.5)));
} else if (x <= 6.2e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = a + ((z + t) + (log(c) * (b + (-0.5d0))))
t_2 = a + (t + ((x * log(y)) + z))
if (x <= (-3.3d+70)) then
tmp = t_2
else if (x <= (-2.9d-6)) then
tmp = t_1
else if (x <= (-8.8d-123)) then
tmp = (y * i) + (a + (t + (log(c) * (-0.5d0))))
else if (x <= 6.2d+70) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + ((z + t) + (Math.log(c) * (b + -0.5)));
double t_2 = a + (t + ((x * Math.log(y)) + z));
double tmp;
if (x <= -3.3e+70) {
tmp = t_2;
} else if (x <= -2.9e-6) {
tmp = t_1;
} else if (x <= -8.8e-123) {
tmp = (y * i) + (a + (t + (Math.log(c) * -0.5)));
} else if (x <= 6.2e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + ((z + t) + (math.log(c) * (b + -0.5))) t_2 = a + (t + ((x * math.log(y)) + z)) tmp = 0 if x <= -3.3e+70: tmp = t_2 elif x <= -2.9e-6: tmp = t_1 elif x <= -8.8e-123: tmp = (y * i) + (a + (t + (math.log(c) * -0.5))) elif x <= 6.2e+70: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))) t_2 = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) tmp = 0.0 if (x <= -3.3e+70) tmp = t_2; elseif (x <= -2.9e-6) tmp = t_1; elseif (x <= -8.8e-123) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(log(c) * -0.5)))); elseif (x <= 6.2e+70) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + ((z + t) + (log(c) * (b + -0.5))); t_2 = a + (t + ((x * log(y)) + z)); tmp = 0.0; if (x <= -3.3e+70) tmp = t_2; elseif (x <= -2.9e-6) tmp = t_1; elseif (x <= -8.8e-123) tmp = (y * i) + (a + (t + (log(c) * -0.5))); elseif (x <= 6.2e+70) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e+70], t$95$2, If[LessEqual[x, -2.9e-6], t$95$1, If[LessEqual[x, -8.8e-123], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+70], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
t_2 := a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \log c \cdot -0.5\right)\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.30000000000000016e70 or 6.2000000000000006e70 < x Initial program 99.7%
Taylor expanded in y around 0 79.8%
Taylor expanded in x around inf 69.9%
if -3.30000000000000016e70 < x < -2.9000000000000002e-6 or -8.80000000000000025e-123 < x < 6.2000000000000006e70Initial program 99.9%
Taylor expanded in x around 0 99.4%
add-cbrt-cube68.0%
pow368.0%
sub-neg68.0%
metadata-eval68.0%
*-commutative68.0%
Applied egg-rr68.0%
Taylor expanded in y around 0 86.1%
associate-+r+86.1%
sub-neg86.1%
metadata-eval86.1%
+-commutative86.1%
Simplified86.1%
if -2.9000000000000002e-6 < x < -8.80000000000000025e-123Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in b around 0 89.0%
Taylor expanded in z around 0 88.6%
Final simplification80.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (+ b -0.5)))
(t_2 (+ (* y i) (+ (* (log c) -0.5) (+ z a)))))
(if (<= b -3.5e+36)
(+ (* y i) (+ (+ t a) t_1))
(if (<= b 8.5e-162)
t_2
(if (<= b 2.6e-72)
(+ a (+ t (+ (* x (log y)) z)))
(if (<= b 2.4e-29) t_2 (+ a (+ (+ z t) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b + -0.5);
double t_2 = (y * i) + ((log(c) * -0.5) + (z + a));
double tmp;
if (b <= -3.5e+36) {
tmp = (y * i) + ((t + a) + t_1);
} else if (b <= 8.5e-162) {
tmp = t_2;
} else if (b <= 2.6e-72) {
tmp = a + (t + ((x * log(y)) + z));
} else if (b <= 2.4e-29) {
tmp = t_2;
} else {
tmp = a + ((z + t) + 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 = log(c) * (b + (-0.5d0))
t_2 = (y * i) + ((log(c) * (-0.5d0)) + (z + a))
if (b <= (-3.5d+36)) then
tmp = (y * i) + ((t + a) + t_1)
else if (b <= 8.5d-162) then
tmp = t_2
else if (b <= 2.6d-72) then
tmp = a + (t + ((x * log(y)) + z))
else if (b <= 2.4d-29) then
tmp = t_2
else
tmp = a + ((z + t) + 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 = Math.log(c) * (b + -0.5);
double t_2 = (y * i) + ((Math.log(c) * -0.5) + (z + a));
double tmp;
if (b <= -3.5e+36) {
tmp = (y * i) + ((t + a) + t_1);
} else if (b <= 8.5e-162) {
tmp = t_2;
} else if (b <= 2.6e-72) {
tmp = a + (t + ((x * Math.log(y)) + z));
} else if (b <= 2.4e-29) {
tmp = t_2;
} else {
tmp = a + ((z + t) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b + -0.5) t_2 = (y * i) + ((math.log(c) * -0.5) + (z + a)) tmp = 0 if b <= -3.5e+36: tmp = (y * i) + ((t + a) + t_1) elif b <= 8.5e-162: tmp = t_2 elif b <= 2.6e-72: tmp = a + (t + ((x * math.log(y)) + z)) elif b <= 2.4e-29: tmp = t_2 else: tmp = a + ((z + t) + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b + -0.5)) t_2 = Float64(Float64(y * i) + Float64(Float64(log(c) * -0.5) + Float64(z + a))) tmp = 0.0 if (b <= -3.5e+36) tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + t_1)); elseif (b <= 8.5e-162) tmp = t_2; elseif (b <= 2.6e-72) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); elseif (b <= 2.4e-29) tmp = t_2; else tmp = Float64(a + Float64(Float64(z + t) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b + -0.5); t_2 = (y * i) + ((log(c) * -0.5) + (z + a)); tmp = 0.0; if (b <= -3.5e+36) tmp = (y * i) + ((t + a) + t_1); elseif (b <= 8.5e-162) tmp = t_2; elseif (b <= 2.6e-72) tmp = a + (t + ((x * log(y)) + z)); elseif (b <= 2.4e-29) tmp = t_2; else tmp = a + ((z + t) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+36], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-162], t$95$2, If[LessEqual[b, 2.6e-72], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-29], t$95$2, N[(a + N[(N[(z + t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b + -0.5\right)\\
t_2 := y \cdot i + \left(\log c \cdot -0.5 + \left(z + a\right)\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+36}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + t\_1\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-72}:\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a + \left(\left(z + t\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -3.4999999999999998e36Initial program 99.7%
Taylor expanded in x around 0 92.5%
Taylor expanded in z around 0 83.4%
associate-+r+83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
if -3.4999999999999998e36 < b < 8.49999999999999955e-162 or 2.59999999999999996e-72 < b < 2.39999999999999992e-29Initial program 99.9%
Taylor expanded in x around 0 85.4%
Taylor expanded in b around 0 84.6%
Taylor expanded in t around 0 66.8%
associate-+r+66.8%
Simplified66.8%
if 8.49999999999999955e-162 < b < 2.59999999999999996e-72Initial program 100.0%
Taylor expanded in y around 0 88.9%
Taylor expanded in x around inf 88.9%
if 2.39999999999999992e-29 < b Initial program 99.9%
Taylor expanded in x around 0 92.2%
add-cbrt-cube38.6%
pow338.6%
sub-neg38.6%
metadata-eval38.6%
*-commutative38.6%
Applied egg-rr38.6%
Taylor expanded in y around 0 83.6%
associate-+r+83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
Simplified83.6%
Final simplification76.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (+ (* x (log y)) z)))) (t_2 (+ (* y i) (* b (log c)))))
(if (<= b -9e+70)
t_2
(if (<= b -6.6e-289)
t_1
(if (<= b 2.8e-225) (+ a (* y i)) (if (<= b 1.6e+196) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + ((x * log(y)) + z));
double t_2 = (y * i) + (b * log(c));
double tmp;
if (b <= -9e+70) {
tmp = t_2;
} else if (b <= -6.6e-289) {
tmp = t_1;
} else if (b <= 2.8e-225) {
tmp = a + (y * i);
} else if (b <= 1.6e+196) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = a + (t + ((x * log(y)) + z))
t_2 = (y * i) + (b * log(c))
if (b <= (-9d+70)) then
tmp = t_2
else if (b <= (-6.6d-289)) then
tmp = t_1
else if (b <= 2.8d-225) then
tmp = a + (y * i)
else if (b <= 1.6d+196) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + ((x * Math.log(y)) + z));
double t_2 = (y * i) + (b * Math.log(c));
double tmp;
if (b <= -9e+70) {
tmp = t_2;
} else if (b <= -6.6e-289) {
tmp = t_1;
} else if (b <= 2.8e-225) {
tmp = a + (y * i);
} else if (b <= 1.6e+196) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + ((x * math.log(y)) + z)) t_2 = (y * i) + (b * math.log(c)) tmp = 0 if b <= -9e+70: tmp = t_2 elif b <= -6.6e-289: tmp = t_1 elif b <= 2.8e-225: tmp = a + (y * i) elif b <= 1.6e+196: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) t_2 = Float64(Float64(y * i) + Float64(b * log(c))) tmp = 0.0 if (b <= -9e+70) tmp = t_2; elseif (b <= -6.6e-289) tmp = t_1; elseif (b <= 2.8e-225) tmp = Float64(a + Float64(y * i)); elseif (b <= 1.6e+196) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + ((x * log(y)) + z)); t_2 = (y * i) + (b * log(c)); tmp = 0.0; if (b <= -9e+70) tmp = t_2; elseif (b <= -6.6e-289) tmp = t_1; elseif (b <= 2.8e-225) tmp = a + (y * i); elseif (b <= 1.6e+196) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e+70], t$95$2, If[LessEqual[b, -6.6e-289], t$95$1, If[LessEqual[b, 2.8e-225], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+196], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + \left(x \cdot \log y + z\right)\right)\\
t_2 := y \cdot i + b \cdot \log c\\
\mathbf{if}\;b \leq -9 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -6.6 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-225}:\\
\;\;\;\;a + y \cdot i\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+196}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -8.9999999999999999e70 or 1.59999999999999996e196 < b Initial program 99.8%
Taylor expanded in x around 0 95.6%
Taylor expanded in b around inf 74.0%
*-commutative74.0%
Simplified74.0%
if -8.9999999999999999e70 < b < -6.59999999999999994e-289 or 2.8e-225 < b < 1.59999999999999996e196Initial program 99.9%
Taylor expanded in y around 0 85.7%
Taylor expanded in x around inf 79.7%
if -6.59999999999999994e-289 < b < 2.8e-225Initial program 100.0%
Taylor expanded in x around 0 93.8%
Taylor expanded in a around inf 67.6%
Final simplification77.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -8e+159) (not (<= x 2.3e+212))) (+ a (+ t (+ (* x (log y)) z))) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ 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 <= -8e+159) || !(x <= 2.3e+212)) {
tmp = a + (t + ((x * log(y)) + z));
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + (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 <= (-8d+159)) .or. (.not. (x <= 2.3d+212))) then
tmp = a + (t + ((x * log(y)) + z))
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (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 <= -8e+159) || !(x <= 2.3e+212)) {
tmp = a + (t + ((x * Math.log(y)) + z));
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -8e+159) or not (x <= 2.3e+212): tmp = a + (t + ((x * math.log(y)) + z)) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -8e+159) || !(x <= 2.3e+212)) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + 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 <= -8e+159) || ~((x <= 2.3e+212))) tmp = a + (t + ((x * log(y)) + z)); else tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -8e+159], N[Not[LessEqual[x, 2.3e+212]], $MachinePrecision]], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+159} \lor \neg \left(x \leq 2.3 \cdot 10^{+212}\right):\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -7.9999999999999994e159 or 2.2999999999999998e212 < x Initial program 99.8%
Taylor expanded in y around 0 87.3%
Taylor expanded in x around inf 81.3%
if -7.9999999999999994e159 < x < 2.2999999999999998e212Initial program 99.9%
Taylor expanded in x around 0 95.5%
Final simplification92.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.1e+164) (not (<= x 2.85e+212))) (+ a (+ t (+ (* x (log y)) z))) (+ (* y i) (+ (* b (log c)) (+ 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.1e+164) || !(x <= 2.85e+212)) {
tmp = a + (t + ((x * log(y)) + z));
} else {
tmp = (y * i) + ((b * log(c)) + (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.1d+164)) .or. (.not. (x <= 2.85d+212))) then
tmp = a + (t + ((x * log(y)) + z))
else
tmp = (y * i) + ((b * log(c)) + (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.1e+164) || !(x <= 2.85e+212)) {
tmp = a + (t + ((x * Math.log(y)) + z));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.1e+164) or not (x <= 2.85e+212): tmp = a + (t + ((x * math.log(y)) + z)) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.1e+164) || !(x <= 2.85e+212)) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + 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.1e+164) || ~((x <= 2.85e+212))) tmp = a + (t + ((x * log(y)) + z)); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.1e+164], N[Not[LessEqual[x, 2.85e+212]], $MachinePrecision]], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+164} \lor \neg \left(x \leq 2.85 \cdot 10^{+212}\right):\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.10000000000000003e164 or 2.8500000000000001e212 < x Initial program 99.8%
Taylor expanded in y around 0 87.3%
Taylor expanded in x around inf 81.3%
if -1.10000000000000003e164 < x < 2.8500000000000001e212Initial program 99.9%
Taylor expanded in x around 0 95.5%
Taylor expanded in b around inf 94.0%
*-commutative94.0%
Simplified94.0%
Final simplification91.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y 4.8e+40)
(+ a (+ (+ z t) (* (log c) (+ b -0.5))))
(if (<= y 8e+70)
(+ a (+ t (+ (* x (log y)) z)))
(+ (* y i) (+ (* (log c) -0.5) (+ z a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4.8e+40) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else if (y <= 8e+70) {
tmp = a + (t + ((x * log(y)) + z));
} else {
tmp = (y * i) + ((log(c) * -0.5) + (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 (y <= 4.8d+40) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else if (y <= 8d+70) then
tmp = a + (t + ((x * log(y)) + z))
else
tmp = (y * i) + ((log(c) * (-0.5d0)) + (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 (y <= 4.8e+40) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else if (y <= 8e+70) {
tmp = a + (t + ((x * Math.log(y)) + z));
} else {
tmp = (y * i) + ((Math.log(c) * -0.5) + (z + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4.8e+40: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) elif y <= 8e+70: tmp = a + (t + ((x * math.log(y)) + z)) else: tmp = (y * i) + ((math.log(c) * -0.5) + (z + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4.8e+40) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); elseif (y <= 8e+70) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * -0.5) + Float64(z + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 4.8e+40) tmp = a + ((z + t) + (log(c) * (b + -0.5))); elseif (y <= 8e+70) tmp = a + (t + ((x * log(y)) + z)); else tmp = (y * i) + ((log(c) * -0.5) + (z + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.8e+40], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+70], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.8 \cdot 10^{+40}:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+70}:\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot -0.5 + \left(z + a\right)\right)\\
\end{array}
\end{array}
if y < 4.8e40Initial program 99.8%
Taylor expanded in x around 0 88.2%
add-cbrt-cube58.3%
pow358.3%
sub-neg58.3%
metadata-eval58.3%
*-commutative58.3%
Applied egg-rr58.3%
Taylor expanded in y around 0 82.9%
associate-+r+82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
if 4.8e40 < y < 8.00000000000000058e70Initial program 99.7%
Taylor expanded in y around 0 99.6%
Taylor expanded in x around inf 92.6%
if 8.00000000000000058e70 < y Initial program 99.9%
Taylor expanded in x around 0 88.7%
Taylor expanded in b around 0 73.0%
Taylor expanded in t around 0 64.9%
associate-+r+64.9%
Simplified64.9%
Final simplification77.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* y i))))
(if (<= a 2e-143)
t_1
(if (<= a 2.5e-121)
(+ (* y i) (* b (log c)))
(if (<= a 6e+128) 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 = z + (y * i);
double tmp;
if (a <= 2e-143) {
tmp = t_1;
} else if (a <= 2.5e-121) {
tmp = (y * i) + (b * log(c));
} else if (a <= 6e+128) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z + (y * i)
if (a <= 2d-143) then
tmp = t_1
else if (a <= 2.5d-121) then
tmp = (y * i) + (b * log(c))
else if (a <= 6d+128) then
tmp = t_1
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 t_1 = z + (y * i);
double tmp;
if (a <= 2e-143) {
tmp = t_1;
} else if (a <= 2.5e-121) {
tmp = (y * i) + (b * Math.log(c));
} else if (a <= 6e+128) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = z + (y * i) tmp = 0 if a <= 2e-143: tmp = t_1 elif a <= 2.5e-121: tmp = (y * i) + (b * math.log(c)) elif a <= 6e+128: tmp = t_1 else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(y * i)) tmp = 0.0 if (a <= 2e-143) tmp = t_1; elseif (a <= 2.5e-121) tmp = Float64(Float64(y * i) + Float64(b * log(c))); elseif (a <= 6e+128) tmp = t_1; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = z + (y * i); tmp = 0.0; if (a <= 2e-143) tmp = t_1; elseif (a <= 2.5e-121) tmp = (y * i) + (b * log(c)); elseif (a <= 6e+128) tmp = t_1; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2e-143], t$95$1, If[LessEqual[a, 2.5e-121], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+128], t$95$1, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + y \cdot i\\
\mathbf{if}\;a \leq 2 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-121}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 1.9999999999999999e-143 or 2.49999999999999995e-121 < a < 5.9999999999999997e128Initial program 99.8%
Taylor expanded in x around 0 86.4%
Taylor expanded in z around inf 35.3%
if 1.9999999999999999e-143 < a < 2.49999999999999995e-121Initial program 100.0%
Taylor expanded in x around 0 84.2%
Taylor expanded in b around inf 56.1%
*-commutative56.1%
Simplified56.1%
if 5.9999999999999997e128 < a Initial program 100.0%
Taylor expanded in x around 0 87.9%
Taylor expanded in a around inf 74.0%
Final simplification41.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -4.8e+133) (and (not (<= z -4e+99)) (<= z -1.95e+76))) z (+ 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 <= -4.8e+133) || (!(z <= -4e+99) && (z <= -1.95e+76))) {
tmp = z;
} 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 <= (-4.8d+133)) .or. (.not. (z <= (-4d+99))) .and. (z <= (-1.95d+76))) then
tmp = z
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 <= -4.8e+133) || (!(z <= -4e+99) && (z <= -1.95e+76))) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -4.8e+133) or (not (z <= -4e+99) and (z <= -1.95e+76)): tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -4.8e+133) || (!(z <= -4e+99) && (z <= -1.95e+76))) tmp = z; 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 <= -4.8e+133) || (~((z <= -4e+99)) && (z <= -1.95e+76))) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -4.8e+133], And[N[Not[LessEqual[z, -4e+99]], $MachinePrecision], LessEqual[z, -1.95e+76]]], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+133} \lor \neg \left(z \leq -4 \cdot 10^{+99}\right) \land z \leq -1.95 \cdot 10^{+76}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.7999999999999997e133 or -3.9999999999999999e99 < z < -1.94999999999999995e76Initial program 100.0%
Taylor expanded in y around 0 81.8%
Taylor expanded in z around inf 39.7%
if -4.7999999999999997e133 < z < -3.9999999999999999e99 or -1.94999999999999995e76 < z Initial program 99.8%
Taylor expanded in x around 0 85.3%
Taylor expanded in a around inf 38.6%
Final simplification38.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -2.3e-176) z (if (<= a 4.7e-271) (* y i) (if (<= a 3.4e+119) z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.3e-176) {
tmp = z;
} else if (a <= 4.7e-271) {
tmp = y * i;
} else if (a <= 3.4e+119) {
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 (a <= (-2.3d-176)) then
tmp = z
else if (a <= 4.7d-271) then
tmp = y * i
else if (a <= 3.4d+119) 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 (a <= -2.3e-176) {
tmp = z;
} else if (a <= 4.7e-271) {
tmp = y * i;
} else if (a <= 3.4e+119) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -2.3e-176: tmp = z elif a <= 4.7e-271: tmp = y * i elif a <= 3.4e+119: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -2.3e-176) tmp = z; elseif (a <= 4.7e-271) tmp = Float64(y * i); elseif (a <= 3.4e+119) 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 (a <= -2.3e-176) tmp = z; elseif (a <= 4.7e-271) tmp = y * i; elseif (a <= 3.4e+119) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -2.3e-176], z, If[LessEqual[a, 4.7e-271], N[(y * i), $MachinePrecision], If[LessEqual[a, 3.4e+119], z, a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-176}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-271}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+119}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -2.3000000000000001e-176 or 4.70000000000000005e-271 < a < 3.40000000000000013e119Initial program 99.9%
Taylor expanded in y around 0 81.0%
Taylor expanded in z around inf 17.7%
if -2.3000000000000001e-176 < a < 4.70000000000000005e-271Initial program 99.6%
Taylor expanded in y around inf 20.6%
*-commutative20.6%
Simplified20.6%
if 3.40000000000000013e119 < a Initial program 100.0%
Taylor expanded in a around inf 60.6%
Final simplification24.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.2e+125) (+ 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 (a <= 4.2e+125) {
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 (a <= 4.2d+125) 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 (a <= 4.2e+125) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.2e+125: 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 (a <= 4.2e+125) 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 (a <= 4.2e+125) 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[a, 4.2e+125], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.2 \cdot 10^{+125}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 4.2000000000000001e125Initial program 99.8%
Taylor expanded in x around 0 86.2%
Taylor expanded in z around inf 34.8%
if 4.2000000000000001e125 < a Initial program 100.0%
Taylor expanded in x around 0 88.2%
Taylor expanded in a around inf 72.1%
Final simplification40.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.05e+119) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.05e+119) {
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 (a <= 2.05d+119) 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 (a <= 2.05e+119) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.05e+119: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.05e+119) 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 (a <= 2.05e+119) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.05e+119], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{+119}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.0499999999999999e119Initial program 99.8%
Taylor expanded in y around 0 81.2%
Taylor expanded in z around inf 17.3%
if 2.0499999999999999e119 < a Initial program 100.0%
Taylor expanded in a around inf 60.6%
Final simplification23.9%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
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%
Taylor expanded in a around inf 20.4%
Final simplification20.4%
herbie shell --seed 2024039
(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)))