+ Getting the value for e or for pi Joris Van den Bogaert Both E (the base of the natural logarithms) and PI (the ratio of the circumference of a circle to its diameter) are defined in the Math class as static member variables of type double. e = 2.7182818284590452354 pi = 3.14159265358979323846 System.out.println(Math.E); // 2.718281828459045 System.out.println(Math.PI); // 3.141592653589793

## Getting the value for e or for pi

Joris Van den BogaertBoth E (the base of the natural logarithms) and PI

(the ratio of the circumference of a circle to its diameter)

are defined in the Math class as static member variables of type double.

e = 2.7182818284590452354

pi = 3.14159265358979323846