I had again a look at the algorithm of $sign because I was wondering why we need
an extra routine for the sign of zeta when the argument is a number.
The function sign1 does a call to $float to evalute the function numerically if
the argument is a number. The numerical result is then passed to the function
Lisp function sign. Therefore for numbers as an argument $sign should work for
every function:
An example with gamma_incomplete:
(%i4) sign(gamma_incomplete(1/2,1));
(%o4) pos
(%i5) float(gamma_incomplete(1/2,1));
(%o5) 0.27880558528066
The problem is that the call to $float does not work for the zeta function:
(%i7) sign(zeta(3));
(%o7) pnz
(%i8) float(zeta(3)); /* We expect the numerical evaluation, */
(%o8) zeta(3.0) /* but only the argument has changed. */
For %pi or %e as an argument $float do not work too. sign(zeta(3.0)) and
sign(zeta(3.0b0)) work again as expected and give the sign POS. Thus, at first
we should have a look why $float does not work for some cases.
An extra sign-function is much more interesting for general expressions and with
facts in the assume database like the following examples:
(%i11) assume(x>0,x<1)$
(%i12) sign(sin(x));
(%o12) pnz /* Should be POS */
(%i13) sign(gamma(x));
(%o13) pnz /* Should be POS */
Dieter Kaiser