CONTANTS

Three great constants in mathematics are pi, e, and the golden ratio (phi) which was highlighted in the book "The DaVinci Code." Below are some illustrations on how to express these constants in MAPLE to varying levels of precision.

In MAPLE, "Pi" represents the number pi and "pi" returns the Greek letter. The "evalf" command can be used to generate more or fewer digits of a floating point representation of pi.

> pi;

pi

> Pi;

Pi

> evalf(pi);

pi

> evalf(Pi);

3.1415926535897932385

> evalf(Pi, 100);

3.1415926535897932384626433832795028841971693993751...

To access the constant e you must evaluate the exponential function at 1 by typing "exp(1)."

> exp(1);

exp(1)

> evalf(exp(1));

2.7182818284590452354

> evalf(exp(1), 100);

2.7182818284590452353602874713526624977572470936999...

You can also control the number of digits displayed by using the "Digits" command. Below, we build the number phi and set the number of digits to 100.

> phi;

phi

> phi:=(1+sqrt(5))/2;

phi := 1/2+1/2*sqrt(5)

> Digits:=100;

Digits := 100

> evalf(phi);

1.6180339887498948482045868343656381177203091798057...

>