Chapter 2 questions - Easy semester

If x is negative, Math.sqrt(x) causes a run-time error, but Math.sqrt(Math.abs(x)) does not since x is first converted to its positive equivalent before the square root is performed. ... the resulting double may not be accurate. For instance, if x, y and z are 1, 2 and 4, the double average should be 2.33333 but average will instead be 2.00000 ... ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download