Bill Allombert on Thu, 14 Sep 2017 23:16:29 +0200

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

Re: eulerphi(0)

On Thu, Sep 14, 2017 at 04:31:10PM -0400, Max Alekseyev wrote:
> Thanks to everyone for the explanation -- the value 2 starts making sense
> now.
> What bothers me though is that different (equivalent on positive arguments)
> definitions of eulerphi() result in different values for eulerphi(0).
> I understand that PARI just stick to one particular definition and extents
> the domain of eulerphi() based on this definition.
> Given the number of other popular definitions, would it be more safe to not
> do so, and instead generate an error outside of the positive integers
> domain?

The PARI philosphy has always been to return a result if at all possible.
The result is consistent with znstar(0).