Previous Page Next Page Contents

numlib::phi -- Euler phi function, Euler totient function

Introduction

numlib::phi(n) calculates the Euler phi function of n.

Call(s)

numlib::phi(n)

Parameters

n - integer not equal to zero

Returns

numlib::phi returns a positive integer, if the argument evaluates to an integer unequal zero. If the argument cannot be evaluate to a number, the function call with evaluated arguments is returned .

Overloadable:

n

Related Functions

numlib::invphi

Details

Example 1

numlib::phi works on integers unequal zero:

>> numlib::phi(-7), numlib::phi(10)
   
                                   6, 4
      

Example 2

numlib::phi is returned as a function call with evaluated argument:

>> x := a: numlib::phi(x)
   
                              numlib::phi(a)
      

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000