Java Reference
In-Depth Information
See the Web Course Chapter 2: Te ch section for a table listing all of the Math
methods with brief descriptions of each. The Java 2 API Specifications (see
Resources) provide a detailed description of the Math class.
Java version 1.3 included a new class called StrictMath that holds the same
methods as the Math class but must, according to the class specifications, always
implement the same algorithms from Sun's “Freely Distributable Math Library”
( fdlibm in C) and give the exact same results regardless of the platform. This
differs from the Math class for which JVM designers have more latitude in its
implementation. This means that calculations on one platform may give slightly
different results with the use of the functions in Math in some cases than those
on another platform.
2.14 Web Course materials
The Web Course Chapter 2: Supplements section gives more information and
examples dealing with the language structures such as repetition statements and
flow control statements. It also examines:
differences in the language elements between Java and C/C ++
the javap tool in the JDK that allows one to look at the bytecode in an assembler style
format
the bytecode instruction set
The Chapter 2: Te ch section gives more details about floating-point in Java,
the Math class, and casting and mixing among primitive types. The Chapter 2:
Physics section demonstrates some basic numerical methods with Java such as
example programs using Euler and Predictor-Corrector methods for solving first-
order differential equations.
Resources
Joseph D. Darcy, What Everybody Using the Java TM Programming Language Should Know
About Floating-Point Arithmetic , Sun Microsystems, JavaOne Conference, 2002,
http://servlet.java.sun.com/javaone/sf2002/conf/
sessions/display-1079.en.jsp .
David Flanagan, Java in a Nutshell , 4th edn, O'Reilly, 2002.
David Goldberg, What Every Computer Scientist Should Know About Floating-point
Arithmetic , Computing Surveys, March 1991,
http://docs.sun.com/source/806-3568/ncg - goldberg.html .
James Gosling, Bill Joy, Guy Steele and Gilad Bracha, The Java Language Specification , 2nd
edn, Addison-Wesley, 2000. Online version at http://java.sun.com/docs/books/
jls/second - edition/html/j.title.doc.html .
Java 2 Platform, Standard Edition, API Specification,
http://java.sun.com/j2se/1.5/api/ .
Search WWH ::




Custom Search