+/** Implementation of ex::diff() for a constant always returns 0.
+ *
+ * @see ex::diff */
+ex constant::derivative(const symbol & s) const
+{
+ return _ex0;
+}
+
+int constant::compare_same_type(const basic & other) const
+{
+ GINAC_ASSERT(is_exactly_a<constant>(other));
+ const constant &o = static_cast<const constant &>(other);
+
+ if (serial == o.serial)
+ return 0;
+ else
+ return serial < o.serial ? -1 : 1;
+}
+
+bool constant::is_equal_same_type(const basic & other) const