Write a script that tests whether the examples of the Math method calls shown in Fig. 18.1 actually produce the indicated results.
What will be an ideal response?
```
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <!-- ex18_02.html -->
3
4 <HTML>
5
6 <HEAD>
7 <TITLE>Solution: 18.2</TITLE>
8
9 <SCRIPT LANGUAGE = "JavaScript">
10 document.writeln( "Math.abs( 23.7 ) = " + Math.abs( 23.7 ) );
11 document.writeln( "<BR>Math.abs( 0.0 ) = " + Math.abs( 0.0 ) );
12 document.writeln( "<BR>Math.abs( -23.7 ) = " + Math.abs( -23.7 ) );
13 document.writeln( "<BR>Math.ceil( 9.2 ) = " + Math.ceil( 9.2 ) );
14 document.writeln( "<BR>Math.ceil( -9.8 ) = " + Math.ceil( -9.8 ) );
15 document.writeln( "<BR>Math.cos( 0.0 ) = " + Math.cos( 0.0 ) );
16 document.writeln( "<BR>Math.exp( 1.0 ) = " + Math.exp( 1.0 ) );
17 document.writeln( "<BR>Math.exp( 2.0 ) = " + Math.exp( 2.0 ) );
18 document.writeln( "<BR>Math.floor( 9.2 ) = " + Math.floor( 9.2 ) );
19 document.writeln( "<BR>Math.floor( -9.8 ) = " + Math.floor( -9.8 ) );
20 document.writeln( "<BR>Math.log( 2.718282 ) = " + Math.log( 2.718282 ) );
21 document.writeln( "<BR>Math.log( 7.389056 ) = " + Math.log( 7.389056 ) );
22 document.writeln( "<BR>Math.max( 2.3, 12.7 ) = " + Math.max( 2.3, 12.7 ) );
23 document.writeln( "<BR>Math.max( -2.3, -12.7 ) = " + Math.max( -2.3, -12.7 ) );
24 document.writeln( "<BR>Math.min( 2.3, 12.7 ) = " + Math.min( 2.3, 12.7 ) );
25 document.writeln( "<BR>Math.min( -2.3, -12.7 ) = " + Math.min( -2.3, -12.7 ) );
26 document.writeln( "<BR>Math.pow( 2, 7 ) = " + Math.pow( 2, 7 ) );
27 document.writeln( "<BR>Math.pow( 9, .5 ) = " + Math.pow( 9, .5 ) );
28 document.writeln( "<BR>Math.round( 9.75 ) = " + Math.round( 9.75 ) );
29 document.writeln( "<BR>Math.round( 9.25 ) = " + Math.round( 9.25 ) );
30 document.writeln( "<BR>Math.sin( 0.0 ) = " + Math.sin( 0.0 ) );
31 document.writeln( "<BR>Math.sqrt( 900.0 ) = " + Math.sqrt( 900.0 ) );
32 document.writeln( "<BR>Math.sqrt( 9.0 ) = " + Math.sqrt( 9.0 ) );
33 document.writeln( "<BR>Math.tan( 0.0 ) = " + Math.tan( 0.0 ) );
34 </SCRIPT>
35 </HEAD>
36
37 <BODY>
38 </BODY>
39 </HTML>
```
You might also like to view...
If TextModel or Billboard objects are to be fixed in place in front of the camera, they should be the first objects you add to a world or scene.
Answer the following statement true (T) or false (F)
A search engine is a web server that responds to client requests to search in its stored indexes and (concurrently) runs several web crawler tasks to build and update the indexes. What are the requirements for synchronization between these concurrent activities?
What will be an ideal response?