Max Alekseyev on Thu, 14 Sep 2017 22:38:40 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: eulerphi(0)


Dear John,
I neither can imagine someone intentionally calling eulerphi(0), but it may be evaluated in the course of running no-so-well designed program due to a mistake in the code or some unforeseen conditions.
Produce it an error in PARI, it'd be very easy to identify the problem and correct it. But value 2 (or any other integer value) may make this task much harder.
Regards,
Max

On Thu, Sep 14, 2017 at 3:55 PM, John Cremona <john.cremona@gmail.com> wrote:
I cannot think of anyone wanting to evaluate eulerphi at 0, but one
reason for the answer 2 is that it is exactly the number of units in
Z/nZ when n=0!

John

On 14 September 2017 at 20:46, Max Alekseyev <maxale@gmail.com> wrote:
> Is there any particular reason behind eulerphi(0) = 2 ?
>
> ? eulerphi(0)
> %1 = 2
>
> I'd rather expect eulerphi(0) to result in an error.
> Zero value would also make more sense, since there are no positive integers
> <=0 (even if we do not care about co-primality).
>
> Regards,
> Max