root/trunk/src/tutorials/examples/dm_bugs_1346/test.d

Revision 6, 487 bytes (checked in by jcc7, 3 years ago)

Made more progress in developing convertToWiki and added some files.

Line 
1 /* written: 2004/08/12 */
2
3 import std.math;
4 import std.stdio;
5
6 int main( char[][] arg )
7 {
8 double d;
9
10 d = 0.5;
11
12 writefln("Wrong way...");
13 printf("%f\n", sin(d));
14 writefln();
15 printf("%e\n", sin(d));
16 writefln();
17 writefln();
18
19 writefln("Better way...");
20 printf("%lf\n", sin(d));
21 writefln();
22 printf("%le\n", sin(d));
23 writefln();
24 writefln();
25
26
27 writefln("Easiest way...");
28 writefln(sin(d));
29 writefln();
30 writefln("%e", sin(d));
31 writefln();
32 writefln();
33 return 0;
34 }
Note: See TracBrowser for help on using the browser.