> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dart double

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).

```dart theme={"dark"}
double standard = 3.14159;
double scientific = 1.42e5;         // Evaluates to 142000.0
double negativeScientific = 2.5e-3; // Evaluates to 0.0025
double implicitInteger = 42;        // Implicitly converted to 42.0
```

## Special Values

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

```dart theme={"dark"}
double notANumber = double.nan;
double posInfinity = double.infinity;
double negInfinity = double.negativeInfinity;

// Boundary constants
double max = double.maxFinite; // 1.7976931348623157e+308
double min = double.minPositive; // 5e-324
```

## Parsing and Conversion

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

```dart theme={"dark"}
// Strict parsing; throws FormatException if invalid
double parsed = double.parse("3.14");

// Safe parsing; returns null if invalid
double? safeParsed = double.tryParse("NaN_String"); 

// Conversion from int
int integerValue = 5;
double converted = integerValue.toDouble();
```

## 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.

```dart theme={"dark"}
double a = 0.1;
double b = 0.2;
double sum = a + b; // Evaluates to 0.30000000000000004
```

## Core Properties and Methods

The `double` type inherits and implements various properties and methods for mathematical rounding, sign evaluation, and state checking.

```dart theme={"dark"}
double value = -7.5;

// State Evaluation
bool isNan = value.isNaN;           // false
bool isInfinite = value.isInfinite; // false
bool isFinite = value.isFinite;     // true
bool isNegative = value.isNegative; // true

// Mathematical Operations
double absolute = value.abs();      // 7.5
int rounded = value.round();        // -8 (Rounds to nearest integer)
int ceiled = value.ceil();          // -7 (Rounds towards positive infinity)
int floored = value.floor();        // -8 (Rounds towards negative infinity)
int truncated = value.truncate();   // -7 (Discards fractional digits)
```

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor Dart Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
