IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
StrictMath.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2007-2014 Jeroen Frijters
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19
20 Jeroen Frijters
21 jeroen@frijters.net
22
23*/
24using System;
25
27
29{
30
31 static class StrictMath
32 {
33
34 public static double sin(double d)
35 {
36#if FIRST_PASS
37 return 0;
38#else
39 return global::ikvm.@internal.JMath.sin(d);
40#endif
41 }
42
43 public static double cos(double d)
44 {
45#if FIRST_PASS
46 return 0;
47#else
48 return global::ikvm.@internal.JMath.cos(d);
49#endif
50 }
51
52 public static double tan(double d)
53 {
54 return fdlibm.tan(d);
55 }
56
57 public static double asin(double d)
58 {
59#if FIRST_PASS
60 return 0;
61#else
62 return global::ikvm.@internal.JMath.asin(d);
63#endif
64 }
65
66 public static double acos(double d)
67 {
68#if FIRST_PASS
69 return 0;
70#else
71 return global::ikvm.@internal.JMath.acos(d);
72#endif
73 }
74
75 public static double atan(double d)
76 {
77#if FIRST_PASS
78 return 0;
79#else
80 return global::ikvm.@internal.JMath.atan(d);
81#endif
82 }
83
84 public static double exp(double d)
85 {
86#if FIRST_PASS
87 return 0;
88#else
89 return global::ikvm.@internal.JMath.exp(d);
90#endif
91 }
92
93 public static double log(double d)
94 {
95 // FPU behavior is correct
96 return Math.Log(d);
97 }
98
99 public static double log10(double d)
100 {
101 // FPU behavior is correct
102 return Math.Log10(d);
103 }
104
105 public static double sqrt(double d)
106 {
107 // FPU behavior is correct
108 return Math.Sqrt(d);
109 }
110
111 public static double cbrt(double d)
112 {
113 return fdlibm.cbrt(d);
114 }
115
116 public static double IEEEremainder(double f1, double f2)
117 {
118#if FIRST_PASS
119 return 0;
120#else
121 return global::ikvm.@internal.JMath.IEEEremainder(f1, f2);
122#endif
123 }
124
125 public static double atan2(double y, double x)
126 {
127#if FIRST_PASS
128 return 0;
129#else
130 return global::ikvm.@internal.JMath.atan2(y, x);
131#endif
132 }
133
134 public static double pow(double x, double y)
135 {
136 return fdlibm.__ieee754_pow(x, y);
137 }
138
139 public static double sinh(double d)
140 {
141 return Math.Sinh(d);
142 }
143
144 public static double cosh(double d)
145 {
146 return Math.Cosh(d);
147 }
148
149 public static double tanh(double d)
150 {
151 return Math.Tanh(d);
152 }
153
154 public static double hypot(double a, double b)
155 {
156 return fdlibm.__ieee754_hypot(a, b);
157 }
158
159 public static double expm1(double d)
160 {
161 return fdlibm.expm1(d);
162 }
163
164 public static double log1p(double d)
165 {
166 return fdlibm.log1p(d);
167 }
168
169 }
170
171}
static double atan2(double y, double x)
static double log10(double d)
Definition StrictMath.cs:99
static double IEEEremainder(double f1, double f2)
static double hypot(double a, double b)
static double pow(double x, double y)