Basic HTML version of Foils prepared Sept 21 1998

Foil 19 The java.lang.Math class

From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken


This class provides standard mathematical functions, using types int, long, float and double.
It is a static class, meaning that you only use the methods and never create "Math objects".
The methods include
  • IEEEremainder, abs, ceil, cos, exp, floor, log, max, min, pow, random, sin, sqrt, and other trig functions.
The random number generator is a linear congruential generator, which is fast but not random enough for many scientific applications.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998