On Wednesday, June 16, 2010, Tom Coates <t.coa...@imperial.ac.uk> wrote:
>
>
> On 16 June, 07:48, rjf <fate...@gmail.com> wrote:
>
>> By your reasoning, and for other domains we would have the following
>> behavior:
>>
>> 1-2  --> error.    1 and 2 are both positive integers. In order to
>> provide the answer -1, one must
>> expand the domain to include negative integers.
>>
>> 1 / 2  -->   error..   (integers vs. rationals).  Indeed there are
>> some systems (Axiom) that warn about such things.
>>
>> sqrt(-1) -->  error.  after all, some Sage users may not have
>> encountered imaginary numbers.
>
> This is not correct, because by "domain" I meant "the set on which the
> function is defined", i.e. the set of permissible *inputs* to the
> function.  With this definition of domain, none of the operations you
> discuss should raise an error: there is no reason in general why the
> *output* from a function should lie in the domain of that function.
>
> That said, if the consensus is that factorial(x) should be
> analytically continued, to allow x to be an explicit non-integral
> number (as is the case in Maple and Mathematica), then I am happy with
> this.  But then we should change the documentation of factorial() to
> make this clear.
>
> At the moment there does not seem to be a clear consensus either way.
> If you have an opinion on this, please vote!  Let x be an explicit
> numerical value such that x is not a non-negative integer (e.g. x=2/3,
> x=1.5, or x=i).  The options are:
>
> A)  factorial(x) should raise an error;
>
> B)  factorial(x) should return gamma(x+1).
>

I vote for B, because:

*  backwards compatibility - we don't break existing code; voting for
A means potentially breaking tons of code out there and pissing off
users

* gamma(x+1) is "socially" the canonical extension of factorial to C

* there are technical conditions one can impose under which gamma(x+1)
really is the canonical extension of factorial - see wikipedia

William



> Best,
>
> Tom
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to