PHP - 64-bit real number: double, float, real

64-bit real number and his value range: from - 1.7 × 10 on 308 to +1.7 × 10 on 308 and it has 15 digit precision. if it is used to store integers the biggest integer what can store without rounding is 2 on 53. 64-bit real number is stored the following way: 1bit sign, 8bit exponent a 23bit mantissa.

double

Description

double
Used keywords: double

Examples

PHP

64-bit real number the possible of use:
$x= 3.14159265359;     // x = 3.14159265359
$y= 123456789;         // y = 123456789.0
$y =(double)($x * $y);          // y = 387850941.35821074

PHP

Other pieces of example codes:
(double)$y
(double)$x
(double)$i
(double)$x
(double)$x
(double)$x

float

Description

 float
Used keywords: float

Examples

PHP

64-bit real number the possible of use:
$x= 3.14159265359;     // x = 3.14159265359
$y= 123456789;         // y = 123456789.0
$y =(double)($x * $y);          // y = 387850941.35821074

real

Description

real
Used keywords: real

Examples

PHP

64-bit real number the possible of use:
$x= 3.14159265359;     // x = 3.14159265359
$y= 123456789;         // y = 123456789.0
$y =(double)($x * $y);          // y = 387850941.35821074

You can find it in the following collections: real numbers | numbers | data types
Languages: en hu cz sk