Go Floating Point: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=Overview= | =Overview= | ||
Floating-point numbers are designated by the following [[Go_Language#Pre-Declared_Types|pre-declared type identifiers]]: | Floating-point numbers are designated by the following [[Go_Language#Pre-Declared_Types|pre-declared type identifiers]]: | ||
* Single precision <code>float32</code> 4 bytes IEEE-754 binary floating point, approximately 6 digits of precision. | * Single precision <code>float32</code> 4 bytes IEEE-754 binary floating point, approximately 6 digits of precision. | ||
* Double precision <code>float64</code>, 15 digits of precision. | * Double precision <code>float64</code>, 15 digits of precision. | ||
* Complex: <code>complex64</code> and <code>complex128</code>. | * Complex: <code>complex64</code> and <code>complex128</code>. | ||
Uninitialized variable value: <code>+0.000000e+000</code> | |||
=Floating-Point Literals= | =Floating-Point Literals= |
Revision as of 04:05, 19 August 2023
Internal
Overview
Floating-point numbers are designated by the following pre-declared type identifiers:
- Single precision
float32
4 bytes IEEE-754 binary floating point, approximately 6 digits of precision. - Double precision
float64
, 15 digits of precision. - Complex:
complex64
andcomplex128
.
Uninitialized variable value: +0.000000e+000