]> www.ginac.de Git - ginac.git/blobdiff - ginac/constant.cpp
- diff() is now only defined on classes ex and basic, where it handles
[ginac.git] / ginac / constant.cpp
index cbf9030883cabc8b4a427ad56f46ea8ab8932006..b8543092c0d993e4b8993ceda68e9a435afba7d5 100644 (file)
@@ -191,6 +191,14 @@ ex constant::evalf(int level) const
 
 // protected
 
+/** Implementation of ex::diff() for a constant. It 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_of_type(other, constant));