Home • ECDL • Algoritmi • Java • Basi di dati • Seconda prova • Eccetera • Cerca nel sito

Virgola mobile

Precedente
SUPERIORE
Successiva
TipoClasse#byte#bit#cifre
MIN_VALUE
MAX_VALUE
float
Float
4326
7
1.40E-45f
2-149
0x1
3.4028235E38f
(2-2-23)2127
0x7f7fffff
double
Double
86414
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

NomeArgomentiTipo
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

NomeArgomentiTipo
doubleToLongBits
double
long
isInfinite
isNaN
...
double
boolean
parseDouble
String
double
toString
...
double
String
valueOf
String
Double

Metodi comuni

NomeTipo
byteValue
byte
shortValue
short
intValue
int
longValue
long
floatValue
float
doubleValue
double
toString
String

Virgola mobile - ApPuNtIdIuNiNfOrMaTiCo

Home • ECDL • Algoritmi • Java • Basi di dati • Seconda prova • Eccetera • Cerca nel sito

Precedente
SUPERIORE
Successiva