]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.cpp
Minor bug fix for the class modular_form_kernel: Ensure that the series-method includ...
[ginac.git] / ginac / ex.cpp
index 9df016748b415c9fac744b6d62a59df4668b4716..d7edbd902366baa9933733376afc493ba73cb6a7 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2017 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2021 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -530,7 +530,25 @@ basic & ex::construct_from_ulong(unsigned long i)
                return dynallocate<numeric>(i);
        }
 }
-       
+
+basic & ex::construct_from_longlong(long long i)
+{
+       if (i >= -12 && i <= 12) {
+               return construct_from_int(static_cast<int>(i));
+       } else {
+               return dynallocate<numeric>(i);
+       }
+}
+
+basic & ex::construct_from_ulonglong(unsigned long long i)
+{
+       if (i <= 12) {
+               return construct_from_uint(static_cast<unsigned>(i));
+       } else {
+               return dynallocate<numeric>(i);
+       }
+}
+
 basic & ex::construct_from_double(double d)
 {
        return dynallocate<numeric>(d);