* src/math.c (logand, lognot): New function.
return MAKE_NUMBER (n);
}
+SCM
+logand (SCM x) ///((arity . n))
+{
+ int n = 0;
+ while (x != cell_nil)
+ {
+ assert (TYPE (car (x)) == TNUMBER);
+ n &= VALUE (car (x));
+ x = cdr (x);
+ }
+ return MAKE_NUMBER (n);
+}
+
SCM
logior (SCM x) ///((arity . n))
{
return MAKE_NUMBER (n);
}
+SCM
+lognot (SCM x)
+{
+ assert (TYPE (x) == TNUMBER);
+ int n = ~VALUE (x);
+ return MAKE_NUMBER (n);
+}
+
SCM
ash (SCM n, SCM count)
{