
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (- b 0.5) (log c) (+ t (fma x (log y) (+ z a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b - 0.5), log(c), (t + fma(x, log(y), (z + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b - 0.5), log(c), Float64(t + fma(x, log(y), Float64(z + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(x * N[Log[y], $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, t + \mathsf{fma}\left(x, \log y, z + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (- 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 ((a + (t + (z + (x * log(y))))) + ((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 = ((a + (t + (z + (x * log(y))))) + ((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 ((a + (t + (z + (x * Math.log(y))))) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + ((b - 0.5) * math.log(c))) + (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(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c))) + (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[(b - 0.5), $MachinePrecision] * N[Log[c], $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) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.2%
Final simplification97.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))))
(if (<= x -1.22e+176)
(+ (* y i) (+ (* x (log y)) t_1))
(if (<= x 6.2e+99)
(+ (* y i) (+ (* (- b 0.5) (log c)) t_1))
(+ (* y i) (fma (log y) x (+ z (+ t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if (x <= -1.22e+176) {
tmp = (y * i) + ((x * log(y)) + t_1);
} else if (x <= 6.2e+99) {
tmp = (y * i) + (((b - 0.5) * log(c)) + t_1);
} else {
tmp = (y * i) + fma(log(y), x, (z + (t + a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) tmp = 0.0 if (x <= -1.22e+176) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)); elseif (x <= 6.2e+99) tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + t_1)); else tmp = Float64(Float64(y * i) + fma(log(y), x, Float64(z + Float64(t + a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e+176], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+99], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+176}:\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t_1\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+99}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(\log y, x, z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -1.2199999999999999e176Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in b around 0 97.1%
if -1.2199999999999999e176 < x < 6.2000000000000001e99Initial program 99.9%
Taylor expanded in x around 0 99.4%
if 6.2000000000000001e99 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in b around 0 96.4%
fma-def96.5%
+-commutative96.5%
+-commutative96.5%
associate-+l+96.5%
+-commutative96.5%
Simplified96.5%
Final simplification98.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2e+176) (not (<= (- b 0.5) 5e+82))) (+ (* y i) (+ a (* b (log c)))) (+ (* y i) (+ (* x (log y)) (+ a (+ t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -2e+176) || !((b - 0.5) <= 5e+82)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + ((x * log(y)) + (a + (t + 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 (((b - 0.5d0) <= (-2d+176)) .or. (.not. ((b - 0.5d0) <= 5d+82))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + ((x * log(y)) + (a + (t + 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 (((b - 0.5) <= -2e+176) || !((b - 0.5) <= 5e+82)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + ((x * Math.log(y)) + (a + (t + z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -2e+176) or not ((b - 0.5) <= 5e+82): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + ((x * math.log(y)) + (a + (t + z))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -2e+176) || !(Float64(b - 0.5) <= 5e+82)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(a + Float64(t + z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -2e+176) || ~(((b - 0.5) <= 5e+82))) tmp = (y * i) + (a + (b * log(c))); else tmp = (y * i) + ((x * log(y)) + (a + (t + z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+176], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+82]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+176} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+82}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(t + z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2e176 or 5.00000000000000015e82 < (-.f64 b 1/2) Initial program 99.6%
Taylor expanded in a around inf 70.8%
Taylor expanded in b around inf 70.8%
if -2e176 < (-.f64 b 1/2) < 5.00000000000000015e82Initial program 99.9%
Taylor expanded in b around inf 96.0%
Taylor expanded in b around 0 95.3%
Final simplification87.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c)))
(t_2 (+ (* y i) (+ (* x (log y)) (+ t z)))))
(if (<= a 2.6e-69)
(+ (* y i) (+ z t_1))
(if (<= a 0.0037)
t_2
(if (<= a 1.4e+71)
(+ (* y i) (+ a t_1))
(if (<= a 1.3e+105) t_2 (+ (* y i) (+ a (* b (log c))))))))))
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 t_2 = (y * i) + ((x * log(y)) + (t + z));
double tmp;
if (a <= 2.6e-69) {
tmp = (y * i) + (z + t_1);
} else if (a <= 0.0037) {
tmp = t_2;
} else if (a <= 1.4e+71) {
tmp = (y * i) + (a + t_1);
} else if (a <= 1.3e+105) {
tmp = t_2;
} else {
tmp = (y * i) + (a + (b * log(c)));
}
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 = (b - 0.5d0) * log(c)
t_2 = (y * i) + ((x * log(y)) + (t + z))
if (a <= 2.6d-69) then
tmp = (y * i) + (z + t_1)
else if (a <= 0.0037d0) then
tmp = t_2
else if (a <= 1.4d+71) then
tmp = (y * i) + (a + t_1)
else if (a <= 1.3d+105) then
tmp = t_2
else
tmp = (y * i) + (a + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * Math.log(c);
double t_2 = (y * i) + ((x * Math.log(y)) + (t + z));
double tmp;
if (a <= 2.6e-69) {
tmp = (y * i) + (z + t_1);
} else if (a <= 0.0037) {
tmp = t_2;
} else if (a <= 1.4e+71) {
tmp = (y * i) + (a + t_1);
} else if (a <= 1.3e+105) {
tmp = t_2;
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b - 0.5) * math.log(c) t_2 = (y * i) + ((x * math.log(y)) + (t + z)) tmp = 0 if a <= 2.6e-69: tmp = (y * i) + (z + t_1) elif a <= 0.0037: tmp = t_2 elif a <= 1.4e+71: tmp = (y * i) + (a + t_1) elif a <= 1.3e+105: tmp = t_2 else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) t_2 = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(t + z))) tmp = 0.0 if (a <= 2.6e-69) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (a <= 0.0037) tmp = t_2; elseif (a <= 1.4e+71) tmp = Float64(Float64(y * i) + Float64(a + t_1)); elseif (a <= 1.3e+105) tmp = t_2; else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b - 0.5) * log(c); t_2 = (y * i) + ((x * log(y)) + (t + z)); tmp = 0.0; if (a <= 2.6e-69) tmp = (y * i) + (z + t_1); elseif (a <= 0.0037) tmp = t_2; elseif (a <= 1.4e+71) tmp = (y * i) + (a + t_1); elseif (a <= 1.3e+105) tmp = t_2; else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = 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]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.6e-69], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.0037], t$95$2, If[LessEqual[a, 1.4e+71], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+105], t$95$2, N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
t_2 := y \cdot i + \left(x \cdot \log y + \left(t + z\right)\right)\\
\mathbf{if}\;a \leq 2.6 \cdot 10^{-69}:\\
\;\;\;\;y \cdot i + \left(z + t_1\right)\\
\mathbf{elif}\;a \leq 0.0037:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+71}:\\
\;\;\;\;y \cdot i + \left(a + t_1\right)\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+105}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 2.6000000000000002e-69Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
fma-udef99.8%
add-cube-cbrt98.7%
pow298.7%
fma-udef98.7%
associate-+r+98.7%
associate-+l+98.7%
+-commutative98.7%
associate-+l+98.7%
fma-def98.7%
fma-udef98.7%
Applied egg-rr98.7%
Taylor expanded in z around inf 62.7%
if 2.6000000000000002e-69 < a < 0.0037000000000000002 or 1.40000000000000001e71 < a < 1.3000000000000001e105Initial program 99.6%
Taylor expanded in b around inf 99.6%
Taylor expanded in b around 0 84.2%
Taylor expanded in a around 0 84.1%
if 0.0037000000000000002 < a < 1.40000000000000001e71Initial program 100.0%
Taylor expanded in a around inf 49.0%
if 1.3000000000000001e105 < a Initial program 99.9%
Taylor expanded in a around inf 74.5%
Taylor expanded in b around inf 74.5%
Final simplification65.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))))
(if (or (<= x -6e+176) (not (<= x 1.7e+98)))
(+ (* y i) (+ (* x (log y)) t_1))
(+ (* y i) (+ (* (- b 0.5) (log c)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -6e+176) || !(x <= 1.7e+98)) {
tmp = (y * i) + ((x * log(y)) + t_1);
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + z)
if ((x <= (-6d+176)) .or. (.not. (x <= 1.7d+98))) then
tmp = (y * i) + ((x * log(y)) + t_1)
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -6e+176) || !(x <= 1.7e+98)) {
tmp = (y * i) + ((x * Math.log(y)) + t_1);
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + z) tmp = 0 if (x <= -6e+176) or not (x <= 1.7e+98): tmp = (y * i) + ((x * math.log(y)) + t_1) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) tmp = 0.0 if ((x <= -6e+176) || !(x <= 1.7e+98)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + z); tmp = 0.0; if ((x <= -6e+176) || ~((x <= 1.7e+98))) tmp = (y * i) + ((x * log(y)) + t_1); else tmp = (y * i) + (((b - 0.5) * log(c)) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -6e+176], N[Not[LessEqual[x, 1.7e+98]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+176} \lor \neg \left(x \leq 1.7 \cdot 10^{+98}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + t_1\right)\\
\end{array}
\end{array}
if x < -6e176 or 1.69999999999999986e98 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in b around 0 96.7%
if -6e176 < x < 1.69999999999999986e98Initial program 99.9%
Taylor expanded in x around 0 99.4%
Final simplification98.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))))
(if (<= z -3.2e+110)
(+ (* y i) t_1)
(if (or (<= z -7.4e+58) (not (<= z -2.4e+14)))
(+ (* y i) (+ a (* (- b 0.5) (log c))))
(+ (* x (log y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if (z <= -3.2e+110) {
tmp = (y * i) + t_1;
} else if ((z <= -7.4e+58) || !(z <= -2.4e+14)) {
tmp = (y * i) + (a + ((b - 0.5) * log(c)));
} else {
tmp = (x * log(y)) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + z)
if (z <= (-3.2d+110)) then
tmp = (y * i) + t_1
else if ((z <= (-7.4d+58)) .or. (.not. (z <= (-2.4d+14)))) then
tmp = (y * i) + (a + ((b - 0.5d0) * log(c)))
else
tmp = (x * log(y)) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if (z <= -3.2e+110) {
tmp = (y * i) + t_1;
} else if ((z <= -7.4e+58) || !(z <= -2.4e+14)) {
tmp = (y * i) + (a + ((b - 0.5) * Math.log(c)));
} else {
tmp = (x * Math.log(y)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + z) tmp = 0 if z <= -3.2e+110: tmp = (y * i) + t_1 elif (z <= -7.4e+58) or not (z <= -2.4e+14): tmp = (y * i) + (a + ((b - 0.5) * math.log(c))) else: tmp = (x * math.log(y)) + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) tmp = 0.0 if (z <= -3.2e+110) tmp = Float64(Float64(y * i) + t_1); elseif ((z <= -7.4e+58) || !(z <= -2.4e+14)) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(Float64(x * log(y)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + z); tmp = 0.0; if (z <= -3.2e+110) tmp = (y * i) + t_1; elseif ((z <= -7.4e+58) || ~((z <= -2.4e+14))) tmp = (y * i) + (a + ((b - 0.5) * log(c))); else tmp = (x * log(y)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+110], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[z, -7.4e+58], N[Not[LessEqual[z, -2.4e+14]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+110}:\\
\;\;\;\;y \cdot i + t_1\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{+58} \lor \neg \left(z \leq -2.4 \cdot 10^{+14}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + t_1\\
\end{array}
\end{array}
if z < -3.19999999999999994e110Initial program 99.9%
Taylor expanded in b around inf 99.9%
Taylor expanded in b around 0 94.4%
Taylor expanded in x around 0 84.4%
if -3.19999999999999994e110 < z < -7.4000000000000004e58 or -2.4e14 < z Initial program 99.8%
Taylor expanded in a around inf 59.0%
if -7.4000000000000004e58 < z < -2.4e14Initial program 100.0%
Taylor expanded in b around inf 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 90.0%
Final simplification64.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))))
(if (or (<= x -6e+176) (not (<= x 3e+95)))
(+ (* y i) (+ (* x (log y)) t_1))
(+ (* y i) (+ (* b (log c)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -6e+176) || !(x <= 3e+95)) {
tmp = (y * i) + ((x * log(y)) + t_1);
} else {
tmp = (y * i) + ((b * log(c)) + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + z)
if ((x <= (-6d+176)) .or. (.not. (x <= 3d+95))) then
tmp = (y * i) + ((x * log(y)) + t_1)
else
tmp = (y * i) + ((b * log(c)) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -6e+176) || !(x <= 3e+95)) {
tmp = (y * i) + ((x * Math.log(y)) + t_1);
} else {
tmp = (y * i) + ((b * Math.log(c)) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + z) tmp = 0 if (x <= -6e+176) or not (x <= 3e+95): tmp = (y * i) + ((x * math.log(y)) + t_1) else: tmp = (y * i) + ((b * math.log(c)) + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) tmp = 0.0 if ((x <= -6e+176) || !(x <= 3e+95)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + z); tmp = 0.0; if ((x <= -6e+176) || ~((x <= 3e+95))) tmp = (y * i) + ((x * log(y)) + t_1); else tmp = (y * i) + ((b * log(c)) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -6e+176], N[Not[LessEqual[x, 3e+95]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+176} \lor \neg \left(x \leq 3 \cdot 10^{+95}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + t_1\right)\\
\end{array}
\end{array}
if x < -6e176 or 2.99999999999999991e95 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in b around 0 96.7%
if -6e176 < x < 2.99999999999999991e95Initial program 99.9%
Taylor expanded in b around inf 96.1%
Taylor expanded in x around 0 95.7%
Final simplification96.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))) (t_2 (+ (* x (log y)) t_1)))
(if (<= x -3.9e+175)
t_2
(if (<= x 2.1e-32)
(+ (* y i) t_1)
(if (<= x 5.4e+60) (+ (* y i) (+ a (* b (log c)))) 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 + z);
double t_2 = (x * log(y)) + t_1;
double tmp;
if (x <= -3.9e+175) {
tmp = t_2;
} else if (x <= 2.1e-32) {
tmp = (y * i) + t_1;
} else if (x <= 5.4e+60) {
tmp = (y * i) + (a + (b * log(c)));
} 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 + z)
t_2 = (x * log(y)) + t_1
if (x <= (-3.9d+175)) then
tmp = t_2
else if (x <= 2.1d-32) then
tmp = (y * i) + t_1
else if (x <= 5.4d+60) then
tmp = (y * i) + (a + (b * log(c)))
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 + z);
double t_2 = (x * Math.log(y)) + t_1;
double tmp;
if (x <= -3.9e+175) {
tmp = t_2;
} else if (x <= 2.1e-32) {
tmp = (y * i) + t_1;
} else if (x <= 5.4e+60) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + z) t_2 = (x * math.log(y)) + t_1 tmp = 0 if x <= -3.9e+175: tmp = t_2 elif x <= 2.1e-32: tmp = (y * i) + t_1 elif x <= 5.4e+60: tmp = (y * i) + (a + (b * math.log(c))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) t_2 = Float64(Float64(x * log(y)) + t_1) tmp = 0.0 if (x <= -3.9e+175) tmp = t_2; elseif (x <= 2.1e-32) tmp = Float64(Float64(y * i) + t_1); elseif (x <= 5.4e+60) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + z); t_2 = (x * log(y)) + t_1; tmp = 0.0; if (x <= -3.9e+175) tmp = t_2; elseif (x <= 2.1e-32) tmp = (y * i) + t_1; elseif (x <= 5.4e+60) tmp = (y * i) + (a + (b * log(c))); 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 + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[x, -3.9e+175], t$95$2, If[LessEqual[x, 2.1e-32], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 5.4e+60], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
t_2 := x \cdot \log y + t_1\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+175}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-32}:\\
\;\;\;\;y \cdot i + t_1\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+60}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -3.89999999999999972e175 or 5.3999999999999999e60 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
Taylor expanded in b around 0 93.1%
Taylor expanded in y around 0 80.8%
if -3.89999999999999972e175 < x < 2.0999999999999999e-32Initial program 99.9%
Taylor expanded in b around inf 96.2%
Taylor expanded in b around 0 79.4%
Taylor expanded in x around 0 78.9%
if 2.0999999999999999e-32 < x < 5.3999999999999999e60Initial program 99.6%
Taylor expanded in a around inf 78.8%
Taylor expanded in b around inf 74.0%
Final simplification79.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t z))))
(if (or (<= x -2.55e+175) (not (<= x 9.5e+188)))
(+ (* x (log y)) t_1)
(+ (* y i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -2.55e+175) || !(x <= 9.5e+188)) {
tmp = (x * log(y)) + t_1;
} else {
tmp = (y * i) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + z)
if ((x <= (-2.55d+175)) .or. (.not. (x <= 9.5d+188))) then
tmp = (x * log(y)) + t_1
else
tmp = (y * i) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + z);
double tmp;
if ((x <= -2.55e+175) || !(x <= 9.5e+188)) {
tmp = (x * Math.log(y)) + t_1;
} else {
tmp = (y * i) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + z) tmp = 0 if (x <= -2.55e+175) or not (x <= 9.5e+188): tmp = (x * math.log(y)) + t_1 else: tmp = (y * i) + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + z)) tmp = 0.0 if ((x <= -2.55e+175) || !(x <= 9.5e+188)) tmp = Float64(Float64(x * log(y)) + t_1); else tmp = Float64(Float64(y * i) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + z); tmp = 0.0; if ((x <= -2.55e+175) || ~((x <= 9.5e+188))) tmp = (x * log(y)) + t_1; else tmp = (y * i) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2.55e+175], N[Not[LessEqual[x, 9.5e+188]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + z\right)\\
\mathbf{if}\;x \leq -2.55 \cdot 10^{+175} \lor \neg \left(x \leq 9.5 \cdot 10^{+188}\right):\\
\;\;\;\;x \cdot \log y + t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + t_1\\
\end{array}
\end{array}
if x < -2.55000000000000003e175 or 9.4999999999999996e188 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in b around 0 95.7%
Taylor expanded in y around 0 86.9%
if -2.55000000000000003e175 < x < 9.4999999999999996e188Initial program 99.9%
Taylor expanded in b around inf 96.5%
Taylor expanded in b around 0 78.0%
Taylor expanded in x around 0 75.7%
Final simplification78.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.5e+197) (not (<= x 6.8e+201))) (+ (* y i) (* x (log y))) (+ (* y i) (+ a (+ t z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -7.5e+197) || !(x <= 6.8e+201)) {
tmp = (y * i) + (x * log(y));
} else {
tmp = (y * i) + (a + (t + 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 <= (-7.5d+197)) .or. (.not. (x <= 6.8d+201))) then
tmp = (y * i) + (x * log(y))
else
tmp = (y * i) + (a + (t + 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 <= -7.5e+197) || !(x <= 6.8e+201)) {
tmp = (y * i) + (x * Math.log(y));
} else {
tmp = (y * i) + (a + (t + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -7.5e+197) or not (x <= 6.8e+201): tmp = (y * i) + (x * math.log(y)) else: tmp = (y * i) + (a + (t + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -7.5e+197) || !(x <= 6.8e+201)) tmp = Float64(Float64(y * i) + Float64(x * log(y))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -7.5e+197) || ~((x <= 6.8e+201))) tmp = (y * i) + (x * log(y)); else tmp = (y * i) + (a + (t + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.5e+197], N[Not[LessEqual[x, 6.8e+201]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+197} \lor \neg \left(x \leq 6.8 \cdot 10^{+201}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + z\right)\right)\\
\end{array}
\end{array}
if x < -7.50000000000000046e197 or 6.8e201 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
Taylor expanded in x around inf 74.7%
if -7.50000000000000046e197 < x < 6.8e201Initial program 99.9%
Taylor expanded in b around inf 96.6%
Taylor expanded in b around 0 78.4%
Taylor expanded in x around 0 75.7%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -4.8e+256) (not (<= b 1.02e+229))) (* b (log c)) (+ (* y i) (+ a (+ t z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -4.8e+256) || !(b <= 1.02e+229)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (a + (t + 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 ((b <= (-4.8d+256)) .or. (.not. (b <= 1.02d+229))) then
tmp = b * log(c)
else
tmp = (y * i) + (a + (t + 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 ((b <= -4.8e+256) || !(b <= 1.02e+229)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (a + (t + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -4.8e+256) or not (b <= 1.02e+229): tmp = b * math.log(c) else: tmp = (y * i) + (a + (t + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -4.8e+256) || !(b <= 1.02e+229)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -4.8e+256) || ~((b <= 1.02e+229))) tmp = b * log(c); else tmp = (y * i) + (a + (t + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -4.8e+256], N[Not[LessEqual[b, 1.02e+229]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+256} \lor \neg \left(b \leq 1.02 \cdot 10^{+229}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + z\right)\right)\\
\end{array}
\end{array}
if b < -4.80000000000000028e256 or 1.01999999999999994e229 < b Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in a around 0 99.2%
Taylor expanded in y around inf 99.2%
Taylor expanded in b around inf 86.1%
if -4.80000000000000028e256 < b < 1.01999999999999994e229Initial program 99.9%
Taylor expanded in b around inf 96.9%
Taylor expanded in b around 0 88.5%
Taylor expanded in x around 0 72.9%
Final simplification74.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= a 0.52) (and (not (<= a 9e+70)) (<= a 2.8e+108))) (+ 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 <= 0.52) || (!(a <= 9e+70) && (a <= 2.8e+108))) {
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 <= 0.52d0) .or. (.not. (a <= 9d+70)) .and. (a <= 2.8d+108)) 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 <= 0.52) || (!(a <= 9e+70) && (a <= 2.8e+108))) {
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 <= 0.52) or (not (a <= 9e+70) and (a <= 2.8e+108)): 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 <= 0.52) || (!(a <= 9e+70) && (a <= 2.8e+108))) 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 <= 0.52) || (~((a <= 9e+70)) && (a <= 2.8e+108))) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[a, 0.52], And[N[Not[LessEqual[a, 9e+70]], $MachinePrecision], LessEqual[a, 2.8e+108]]], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 0.52 \lor \neg \left(a \leq 9 \cdot 10^{+70}\right) \land a \leq 2.8 \cdot 10^{+108}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 0.52000000000000002 or 8.9999999999999999e70 < a < 2.7999999999999998e108Initial program 99.8%
Taylor expanded in b around inf 96.6%
Taylor expanded in z around inf 43.6%
if 0.52000000000000002 < a < 8.9999999999999999e70 or 2.7999999999999998e108 < a Initial program 99.9%
Taylor expanded in b around inf 99.1%
Taylor expanded in a around inf 56.8%
Final simplification46.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ t z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (t + 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) + (a + (t + 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) + (a + (t + z));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (t + z))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(t + z))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (t + z)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(t + z\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.2%
Taylor expanded in b around 0 81.8%
Taylor expanded in x around 0 67.2%
Final simplification67.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= i -4.6e+51) (* y i) (if (<= i 7.2e+127) a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -4.6e+51) {
tmp = y * i;
} else if (i <= 7.2e+127) {
tmp = a;
} else {
tmp = 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 (i <= (-4.6d+51)) then
tmp = y * i
else if (i <= 7.2d+127) then
tmp = a
else
tmp = 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 (i <= -4.6e+51) {
tmp = y * i;
} else if (i <= 7.2e+127) {
tmp = a;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -4.6e+51: tmp = y * i elif i <= 7.2e+127: tmp = a else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -4.6e+51) tmp = Float64(y * i); elseif (i <= 7.2e+127) tmp = a; else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (i <= -4.6e+51) tmp = y * i; elseif (i <= 7.2e+127) tmp = a; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -4.6e+51], N[(y * i), $MachinePrecision], If[LessEqual[i, 7.2e+127], a, N[(y * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.6 \cdot 10^{+51}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;i \leq 7.2 \cdot 10^{+127}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if i < -4.6000000000000001e51 or 7.19999999999999958e127 < i Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 88.9%
Taylor expanded in y around inf 49.8%
*-commutative49.8%
Simplified49.8%
if -4.6000000000000001e51 < i < 7.19999999999999958e127Initial program 99.8%
Taylor expanded in b around inf 96.1%
Taylor expanded in a around inf 20.4%
Taylor expanded in a around inf 18.2%
Final simplification30.0%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.2%
Taylor expanded in a around inf 35.4%
Final simplification35.4%
(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.8%
Taylor expanded in b around inf 97.2%
Taylor expanded in a around inf 35.4%
Taylor expanded in a around inf 16.1%
Final simplification16.1%
herbie shell --seed 2023268
(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)))