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