1 /*
2 * Copyright (c) 1994, 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 Float extends java.lang.Number implements java.lang.Comparable<java.lang.Float> {
31
32 @Deprecated
Float(double value)33 public Float(double value) { throw new RuntimeException("Stub!"); }
34
35 @Deprecated
Float(float value)36 public Float(float value) { throw new RuntimeException("Stub!"); }
37
38 @Deprecated
Float(java.lang.String s)39 public Float(java.lang.String s) throws java.lang.NumberFormatException { throw new RuntimeException("Stub!"); }
40
byteValue()41 public byte byteValue() { throw new RuntimeException("Stub!"); }
42
compare(float f1, float f2)43 public static int compare(float f1, float f2) { throw new RuntimeException("Stub!"); }
44
compareTo(java.lang.Float anotherFloat)45 public int compareTo(java.lang.Float anotherFloat) { throw new RuntimeException("Stub!"); }
46
doubleValue()47 public double doubleValue() { throw new RuntimeException("Stub!"); }
48
equals(java.lang.Object obj)49 public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
50
51 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_OPENJDK_21_V1_APIS)
float16ToFloat(short floatBinary16)52 public static float float16ToFloat(short floatBinary16) { throw new RuntimeException("Stub!"); }
53
54 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_OPENJDK_21_V1_APIS)
floatToFloat16(float f)55 public static short floatToFloat16(float f) { throw new RuntimeException("Stub!"); }
56
floatToIntBits(float value)57 public static int floatToIntBits(float value) { throw new RuntimeException("Stub!"); }
58
floatToRawIntBits(float value)59 public static native int floatToRawIntBits(float value);
60
floatValue()61 public float floatValue() { throw new RuntimeException("Stub!"); }
62
hashCode()63 public int hashCode() { throw new RuntimeException("Stub!"); }
64
hashCode(float value)65 public static int hashCode(float value) { throw new RuntimeException("Stub!"); }
66
intBitsToFloat(int bits)67 public static native float intBitsToFloat(int bits);
68
intValue()69 public int intValue() { throw new RuntimeException("Stub!"); }
70
isFinite(float f)71 public static boolean isFinite(float f) { throw new RuntimeException("Stub!"); }
72
isInfinite()73 public boolean isInfinite() { throw new RuntimeException("Stub!"); }
74
isInfinite(float v)75 public static boolean isInfinite(float v) { throw new RuntimeException("Stub!"); }
76
isNaN()77 public boolean isNaN() { throw new RuntimeException("Stub!"); }
78
isNaN(float v)79 public static boolean isNaN(float v) { throw new RuntimeException("Stub!"); }
80
longValue()81 public long longValue() { throw new RuntimeException("Stub!"); }
82
max(float a, float b)83 public static float max(float a, float b) { throw new RuntimeException("Stub!"); }
84
min(float a, float b)85 public static float min(float a, float b) { throw new RuntimeException("Stub!"); }
86
parseFloat(java.lang.String s)87 public static float parseFloat(java.lang.String s) throws java.lang.NumberFormatException { throw new RuntimeException("Stub!"); }
88
shortValue()89 public short shortValue() { throw new RuntimeException("Stub!"); }
90
sum(float a, float b)91 public static float sum(float a, float b) { throw new RuntimeException("Stub!"); }
92
toHexString(float f)93 public static java.lang.String toHexString(float f) { throw new RuntimeException("Stub!"); }
94
toString()95 public java.lang.String toString() { throw new RuntimeException("Stub!"); }
96
toString(float f)97 public static java.lang.String toString(float f) { throw new RuntimeException("Stub!"); }
98
valueOf(float f)99 public static java.lang.Float valueOf(float f) { throw new RuntimeException("Stub!"); }
100
valueOf(java.lang.String s)101 public static java.lang.Float valueOf(java.lang.String s) throws java.lang.NumberFormatException { throw new RuntimeException("Stub!"); }
102
103 public static final int BYTES = 4; // 0x4
104
105 public static final int MAX_EXPONENT = 127; // 0x7f
106
107 public static final float MAX_VALUE = 3.4028235E38f;
108
109 public static final int MIN_EXPONENT = -126; // 0xffffff82
110
111 public static final float MIN_NORMAL = 1.17549435E-38f;
112
113 public static final float MIN_VALUE = 1.4E-45f;
114
115 public static final float NEGATIVE_INFINITY = (-1.0f/0.0f);
116
117 public static final float NaN = (0.0f/0.0f);
118
119 public static final float POSITIVE_INFINITY = (1.0f/0.0f);
120
121 public static final int PRECISION = 24; // 0x18
122
123 public static final int SIZE = 32; // 0x20
124
125 public static final java.lang.Class<java.lang.Float> TYPE;
126 static { TYPE = null; }
127 }
128
129