OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [MathBuiltin.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
class MathBuiltin
2
{
3
  static double abs(double x)
4
  {
5
    return Math.abs(x);
6
  }
7
 
8
  static double acos(double x)
9
  {
10
    return Math.acos(x);
11
  }
12
 
13
  static double asin(double x)
14
  {
15
    return Math.asin(x);
16
  }
17
 
18
  static double atan(double x)
19
  {
20
    return Math.atan(x);
21
  }
22
 
23
  static double atan2(double x, double y)
24
  {
25
    return Math.atan2(x,y);
26
  }
27
 
28
  static double ceil(double x)
29
  {
30
    return Math.ceil(x);
31
  }
32
 
33
  static double cos(double x)
34
  {
35
    return Math.cos(x);
36
  }
37
 
38
  static double exp(double x)
39
  {
40
    return Math.exp(x);
41
  }
42
 
43
  static double floor(double x)
44
  {
45
    return Math.floor(x);
46
  }
47
 
48
  static double log(double x)
49
  {
50
    return Math.log(x);
51
  }
52
 
53
  static double max(double x, double y)
54
  {
55
    return Math.max(x,y);
56
  }
57
 
58
  static double min(double x, double y)
59
  {
60
    return Math.min(x,y);
61
  }
62
 
63
  static double pow(double x, double y)
64
  {
65
    return Math.pow(x,y);
66
  }
67
 
68
  static double sin(double x)
69
  {
70
    return Math.sin(x);
71
  }
72
 
73
  static double sqrt(double x)
74
  {
75
    return Math.sqrt(x);
76
  }
77
 
78
  static double tan(double x)
79
  {
80
    return Math.tan(x);
81
  }
82
 
83
  public static void main(String argv[])
84
  {
85
    double sum = abs (1.0) + acos (1.0) + asin (1.0) + atan (1.0)
86
                 + atan2 (1.0, 1.0) + ceil (1.0) + cos (1.0) + exp (1.0)
87
                 + floor (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0)
88
                 + pow (1.0, 1.0) + sin (1.0) + sqrt(1.0) + tan(1.0);
89
  }
90
}
91
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.