Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / benchmark / math.cs
1 using System;
2
3 public class MulDiv {
4
5         public static double mathtest (int n) {
6                 double res = 0;
7
8                 for (int j = 0; j < 200000; j++) {
9                         res += Math.Sin (j);
10                         res += Math.Cos (j);
11                 }
12                 
13                 return res;
14         }
15         
16         public static int Main (string[] args) {
17                 int repeat = 1;
18                 
19                 if (args.Length == 1)
20                         repeat = Convert.ToInt32 (args [0]);
21                 
22                 Console.WriteLine ("Repeat = " + repeat);
23
24                 for (int i = 0; i < (repeat * 50); i++)
25                         mathtest (1000);
26                 
27                 return 0;
28         }
29 }
30
31