Skip to main content
A double in Dart is a 64-bit double-precision floating-point number conforming to the IEEE 754 standard. It is a subclass of the abstract num type and is utilized to represent fractional numerical values, supporting both standard decimal and scientific notation.

Syntax and Initialization

A double can be instantiated using standard decimal literals, scientific notation, or implicitly from integer literals (as of Dart 2.1).

Special Values

Conforming to IEEE 754, the double class provides static constants to represent specific non-finite and boundary values.

Parsing and Conversion

Dart provides static methods for parsing strings into double objects, alongside instance methods for type conversion from other num types.

Arithmetic Precision

Because Dart utilizes standard IEEE 754 representation, double arithmetic is subject to standard floating-point precision loss. It cannot precisely represent all base-10 fractional numbers.

Core Properties and Methods

The double type inherits and implements various properties and methods for mathematical rounding, sign evaluation, and state checking.
Tired of Poor Dart Skills? Fix That With Deep Grasping!Learn More