Go Floating Point: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


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 <tt>float32</tt> (4 bytes IEEE-754 binary floating point) and double precision <tt>float64</tt>.
* Single precision <code>float32</code> 4 bytes IEEE-754 binary floating point, approximately 6 digits of precision.
* Complex: <tt>complex64</tt> and <tt>complex128</tt>.
* Double precision <code>float64</code>, 15 digits of precision.
* Complex: <code>complex64</code> and <code>complex128</code>.


=Floating-Point Literals=
=Floating-Point Literals=

Revision as of 04:04, 19 August 2023

Internal

Overview

Uninitialized variable value: +0.000000e+000

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 and complex128.

Floating-Point Literals