Tipo | Classe | #byte | #bit | #cifre |
MIN_VALUE | MAX_VALUE |
float | Float | 4 | 32 | 6
7 | 1.40E-45f
2-149
0x1 | 3.4028235E38f
(2-2-23)·2127
0x7f7fffff | double | Double | 8 | 64 | 14
15 | 4.9E-324d
2-1074
0x1L | 1.7976931348623157E308d
(2-2-52)·21023
0x7fefffffffffffffL |
Le costanti predefinite
Tipo | NEGATIVE_INFINITY | POSITIVE_INFINITY | NaN |
float | -1f/0f
0xff800000 | 1f/0f
0x7f800000 | 0f/0f
0x7fc00000 | double | -1d/0d
0xfff0000000000000L | 1d/0d
0x7ff0000000000000L | 0d/0d
0x7ff8000000000000L |
La rappresentazione interna è in virgola mobile IEEE 754. public final class Float extends Number
implements Comparable java.lang.Object
java.lang.Number
java.lang.Float
Metodi
Nome | Argomenti | Tipo |
---|
floatToIntBits | float | int | isInfinite
isNaN | ...
float | boolean
|
---|
parseFloat | String | float | toString | ...
float | String |
valueOf | String | Float |
java.lang.Object
java.lang.Number
java.lang.Double public final class Double extends Number
implements Comparable
Metodi
Nome | Argomenti | Tipo |
---|
doubleToLongBits | double | long | isInfinite
isNaN | ...
double | boolean |
parseDouble | String | double | toString | ...
double | String |
valueOf | String | Double |
Metodi
comuni
Nome | Tipo |
---|
byteValue | byte | shortValue | short |
intValue | int | longValue | long |
floatValue | float | doubleValue | double |
toString | String |
|