]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_gamma.cpp
- modified the comment blocks so the copyright message no longer appears in
[ginac.git] / ginac / inifcns_gamma.cpp
index f575aca5ddc4ff1881e00061766dd1db78afd7f3..34a390ed23e23e1b412609399f926328596570cf 100644 (file)
@@ -1,7 +1,8 @@
 /** @file inifcns_gamma.cpp
  *
- *  Implementation of Gamma function and some related stuff.
- *
+ *  Implementation of Gamma function and some related stuff. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
 #include <vector>
 #include <stdexcept>
 
-#include "ginac.h"
+#include "inifcns.h"
+#include "ex.h"
+#include "constant.h"
+#include "numeric.h"
+#include "power.h"
+#include "symbol.h"
 
 //////////
 // gamma function
@@ -54,14 +60,14 @@ ex gamma_eval(ex const & x)
                 numeric n = ex_to_numeric(x).sub(numHALF());
                 numeric coefficient = doublefactorial(n.mul(numTWO()).sub(numONE()));
                 coefficient = coefficient.div(numTWO().power(n));
-                return mul(coefficient,power(Pi,numHALF()));
+                return coefficient * power(Pi,numHALF());
             } else {
                 // trap negative x=(-n+1/2)
                 // gamma(-n+1/2) -> Pi^(1/2)*(-2)^n/(1*3*..*(2*n-1))
                 numeric n = abs(ex_to_numeric(x).sub(numHALF()));
                 numeric coefficient = numeric(-2).power(n);
                 coefficient = coefficient.div(doublefactorial(n.mul(numTWO()).sub(numONE())));;
-                return mul(coefficient,power(Pi,numHALF()));
+                return coefficient * power(Pi,numHALF());
             }
         }
     }