gamma in the bigfloat package (was RE: equality testing in bigfloat package)



I needed an easy way to call gamma in the bigfloat package, so I defined

(defun gamma (x)
  (bigfloat::to (maxima::take '(maxima::%gamma) (maxima::to x))))

Oops--I was expecting a binary64 result, but I get a bigfloat?

(%i29) :lisp(bigfloat::gamma 1.2)
  1> (BIGFLOAT::GAMMA 1.2)
    2> (TO 1.2)
    <2 (TO 1.2)
    2> (GAMMAFLOAT 1.2)
    <2 (GAMMAFLOAT 0.91816874239976065 NIL)
  <1 (BIGFLOAT::GAMMA
         +9.181687423997607b-1)
+9.181687423997607b-1

--Barton