1 /*
2 * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27 package java.lang;
28
29 @SuppressWarnings({"unchecked", "deprecation", "all"})
30 public final class StrictMath {
31
StrictMath()32 StrictMath() { throw new RuntimeException("Stub!"); }
33
sin(double a)34 public static native double sin(double a);
35
cos(double a)36 public static native double cos(double a);
37
tan(double a)38 public static native double tan(double a);
39
asin(double a)40 public static native double asin(double a);
41
acos(double a)42 public static native double acos(double a);
43
atan(double a)44 public static native double atan(double a);
45
toRadians(double angdeg)46 public static double toRadians(double angdeg) { throw new RuntimeException("Stub!"); }
47
toDegrees(double angrad)48 public static double toDegrees(double angrad) { throw new RuntimeException("Stub!"); }
49
exp(double a)50 public static native double exp(double a);
51
log(double a)52 public static native double log(double a);
53
log10(double a)54 public static native double log10(double a);
55
sqrt(double a)56 public static native double sqrt(double a);
57
cbrt(double a)58 public static native double cbrt(double a);
59
IEEEremainder(double f1, double f2)60 public static native double IEEEremainder(double f1, double f2);
61
ceil(double a)62 public static double ceil(double a) { throw new RuntimeException("Stub!"); }
63
floor(double a)64 public static double floor(double a) { throw new RuntimeException("Stub!"); }
65
rint(double a)66 public static double rint(double a) { throw new RuntimeException("Stub!"); }
67
atan2(double y, double x)68 public static native double atan2(double y, double x);
69
pow(double a, double b)70 public static native double pow(double a, double b);
71
round(float a)72 public static int round(float a) { throw new RuntimeException("Stub!"); }
73
round(double a)74 public static long round(double a) { throw new RuntimeException("Stub!"); }
75
random()76 public static double random() { throw new RuntimeException("Stub!"); }
77
addExact(int x, int y)78 public static int addExact(int x, int y) { throw new RuntimeException("Stub!"); }
79
addExact(long x, long y)80 public static long addExact(long x, long y) { throw new RuntimeException("Stub!"); }
81
subtractExact(int x, int y)82 public static int subtractExact(int x, int y) { throw new RuntimeException("Stub!"); }
83
subtractExact(long x, long y)84 public static long subtractExact(long x, long y) { throw new RuntimeException("Stub!"); }
85
multiplyExact(int x, int y)86 public static int multiplyExact(int x, int y) { throw new RuntimeException("Stub!"); }
87
multiplyExact(long x, int y)88 public static long multiplyExact(long x, int y) { throw new RuntimeException("Stub!"); }
89
multiplyExact(long x, long y)90 public static long multiplyExact(long x, long y) { throw new RuntimeException("Stub!"); }
91
92 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
divideExact(int x, int y)93 public static int divideExact(int x, int y) { throw new RuntimeException("Stub!"); }
94
95 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
divideExact(long x, long y)96 public static long divideExact(long x, long y) { throw new RuntimeException("Stub!"); }
97
98 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
floorDivExact(int x, int y)99 public static int floorDivExact(int x, int y) { throw new RuntimeException("Stub!"); }
100
101 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
floorDivExact(long x, long y)102 public static long floorDivExact(long x, long y) { throw new RuntimeException("Stub!"); }
103
104 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilDivExact(int x, int y)105 public static int ceilDivExact(int x, int y) { throw new RuntimeException("Stub!"); }
106
107 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilDivExact(long x, long y)108 public static long ceilDivExact(long x, long y) { throw new RuntimeException("Stub!"); }
109
incrementExact(int a)110 public static int incrementExact(int a) { throw new RuntimeException("Stub!"); }
111
incrementExact(long a)112 public static long incrementExact(long a) { throw new RuntimeException("Stub!"); }
113
decrementExact(int a)114 public static int decrementExact(int a) { throw new RuntimeException("Stub!"); }
115
decrementExact(long a)116 public static long decrementExact(long a) { throw new RuntimeException("Stub!"); }
117
negateExact(int a)118 public static int negateExact(int a) { throw new RuntimeException("Stub!"); }
119
negateExact(long a)120 public static long negateExact(long a) { throw new RuntimeException("Stub!"); }
121
toIntExact(long value)122 public static int toIntExact(long value) { throw new RuntimeException("Stub!"); }
123
multiplyFull(int x, int y)124 public static long multiplyFull(int x, int y) { throw new RuntimeException("Stub!"); }
125
multiplyHigh(long x, long y)126 public static long multiplyHigh(long x, long y) { throw new RuntimeException("Stub!"); }
127
128 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
unsignedMultiplyHigh(long x, long y)129 public static long unsignedMultiplyHigh(long x, long y) { throw new RuntimeException("Stub!"); }
130
floorDiv(int x, int y)131 public static int floorDiv(int x, int y) { throw new RuntimeException("Stub!"); }
132
floorDiv(long x, int y)133 public static long floorDiv(long x, int y) { throw new RuntimeException("Stub!"); }
134
floorDiv(long x, long y)135 public static long floorDiv(long x, long y) { throw new RuntimeException("Stub!"); }
136
floorMod(int x, int y)137 public static int floorMod(int x, int y) { throw new RuntimeException("Stub!"); }
138
floorMod(long x, int y)139 public static int floorMod(long x, int y) { throw new RuntimeException("Stub!"); }
140
floorMod(long x, long y)141 public static long floorMod(long x, long y) { throw new RuntimeException("Stub!"); }
142
143 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilDiv(int x, int y)144 public static int ceilDiv(int x, int y) { throw new RuntimeException("Stub!"); }
145
146 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilDiv(long x, int y)147 public static long ceilDiv(long x, int y) { throw new RuntimeException("Stub!"); }
148
149 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilDiv(long x, long y)150 public static long ceilDiv(long x, long y) { throw new RuntimeException("Stub!"); }
151
152 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilMod(int x, int y)153 public static int ceilMod(int x, int y) { throw new RuntimeException("Stub!"); }
154
155 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilMod(long x, int y)156 public static int ceilMod(long x, int y) { throw new RuntimeException("Stub!"); }
157
158 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
ceilMod(long x, long y)159 public static long ceilMod(long x, long y) { throw new RuntimeException("Stub!"); }
160
abs(int a)161 public static int abs(int a) { throw new RuntimeException("Stub!"); }
162
absExact(int a)163 public static int absExact(int a) { throw new RuntimeException("Stub!"); }
164
abs(long a)165 public static long abs(long a) { throw new RuntimeException("Stub!"); }
166
absExact(long a)167 public static long absExact(long a) { throw new RuntimeException("Stub!"); }
168
abs(float a)169 public static float abs(float a) { throw new RuntimeException("Stub!"); }
170
abs(double a)171 public static double abs(double a) { throw new RuntimeException("Stub!"); }
172
max(int a, int b)173 public static int max(int a, int b) { throw new RuntimeException("Stub!"); }
174
max(long a, long b)175 public static long max(long a, long b) { throw new RuntimeException("Stub!"); }
176
max(float a, float b)177 public static float max(float a, float b) { throw new RuntimeException("Stub!"); }
178
max(double a, double b)179 public static double max(double a, double b) { throw new RuntimeException("Stub!"); }
180
min(int a, int b)181 public static int min(int a, int b) { throw new RuntimeException("Stub!"); }
182
min(long a, long b)183 public static long min(long a, long b) { throw new RuntimeException("Stub!"); }
184
min(float a, float b)185 public static float min(float a, float b) { throw new RuntimeException("Stub!"); }
186
min(double a, double b)187 public static double min(double a, double b) { throw new RuntimeException("Stub!"); }
188
189 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
clamp(long value, int min, int max)190 public static int clamp(long value, int min, int max) { throw new RuntimeException("Stub!"); }
191
192 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
clamp(long value, long min, long max)193 public static long clamp(long value, long min, long max) { throw new RuntimeException("Stub!"); }
194
195 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
clamp(double value, double min, double max)196 public static double clamp(double value, double min, double max) { throw new RuntimeException("Stub!"); }
197
198 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
clamp(float value, float min, float max)199 public static float clamp(float value, float min, float max) { throw new RuntimeException("Stub!"); }
200
fma(double a, double b, double c)201 public static double fma(double a, double b, double c) { throw new RuntimeException("Stub!"); }
202
fma(float a, float b, float c)203 public static float fma(float a, float b, float c) { throw new RuntimeException("Stub!"); }
204
ulp(double d)205 public static double ulp(double d) { throw new RuntimeException("Stub!"); }
206
ulp(float f)207 public static float ulp(float f) { throw new RuntimeException("Stub!"); }
208
signum(double d)209 public static double signum(double d) { throw new RuntimeException("Stub!"); }
210
signum(float f)211 public static float signum(float f) { throw new RuntimeException("Stub!"); }
212
sinh(double x)213 public static native double sinh(double x);
214
cosh(double x)215 public static native double cosh(double x);
216
tanh(double x)217 public static native double tanh(double x);
218
hypot(double x, double y)219 public static native double hypot(double x, double y);
220
expm1(double x)221 public static native double expm1(double x);
222
log1p(double x)223 public static native double log1p(double x);
224
copySign(double magnitude, double sign)225 public static double copySign(double magnitude, double sign) { throw new RuntimeException("Stub!"); }
226
copySign(float magnitude, float sign)227 public static float copySign(float magnitude, float sign) { throw new RuntimeException("Stub!"); }
228
getExponent(float f)229 public static int getExponent(float f) { throw new RuntimeException("Stub!"); }
230
getExponent(double d)231 public static int getExponent(double d) { throw new RuntimeException("Stub!"); }
232
nextAfter(double start, double direction)233 public static double nextAfter(double start, double direction) { throw new RuntimeException("Stub!"); }
234
nextAfter(float start, double direction)235 public static float nextAfter(float start, double direction) { throw new RuntimeException("Stub!"); }
236
nextUp(double d)237 public static double nextUp(double d) { throw new RuntimeException("Stub!"); }
238
nextUp(float f)239 public static float nextUp(float f) { throw new RuntimeException("Stub!"); }
240
nextDown(double d)241 public static double nextDown(double d) { throw new RuntimeException("Stub!"); }
242
nextDown(float f)243 public static float nextDown(float f) { throw new RuntimeException("Stub!"); }
244
scalb(double d, int scaleFactor)245 public static double scalb(double d, int scaleFactor) { throw new RuntimeException("Stub!"); }
246
scalb(float f, int scaleFactor)247 public static float scalb(float f, int scaleFactor) { throw new RuntimeException("Stub!"); }
248
249 public static final double E = 2.718281828459045;
250
251 public static final double PI = 3.141592653589793;
252
253 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
254 public static final double TAU = 6.283185307179586;
255 }
256
257