3 class TestFloatDouble {
4 static boolean failed = false;
6 static void test(String s, String r) {
8 System.out.println("result "+s+" should be "+r);
13 static void test(float v, String r) {
14 test(Float.toString(v), r);
17 static void test(double v, String r) {
18 test(Double.toString(v), r);
21 public static void main(String args[]) {
22 System.out.println("Some mathmatical tests");
25 test(f1 * f2, "200004");
28 test(d1 * d2, "200004");
32 System.out.println("Results "+s);
38 Some mathmatical tests