# double

## Object Hierarchy:

## Description:

[ SimpleType ]

[ GIR ( name = "gdouble" ) ]

[ CCode ( cname = "gdouble" , default_value = "0.0" , default_value_on_error = "-1.0" , get_value_function = "g_value_get_double" , marshaller_type_name = "DOUBLE" , set_value_function = "g_value_set_double" , type_id = "G_TYPE_DOUBLE" , type_signature = "d" ) ]

[ FloatingType ( rank = 2 ) ]

public struct **double**

## Content:

### Constants:

- public const int
**DIG**
Number of decimal digits that can be represented without losing precision

- public const int
**DTOSTR_BUF_SIZE**
A good size for a buffer to be passed into
to_str.
- public const double
**EPSILON**
Difference between 1.0 and the next representable value for double

- public const double
**INFINITY**
Indicates that the value is not representable by the underlying type
(positive or negative infinity)

- public const int
**MANT_DIG**
Number of base RADIX
digits that can be represented without losing precision
- public const double
**MAX**
Maximum value of double

- public const int
**MAX_10_EXP**
Maximum positive integer such that 10 raised by power one more than that
integer is a normalized double

- public const int
**MAX_EXP**
Maximum positive integer such that
RADIX raised by power one more than that integer is a normalized double
- public const double
**MIN**
Minimum positive value of double, use -
double.MAX to get the minimum negative value
- public const int
**MIN_10_EXP**
Minimum negative integer such that 10 raised by power one less than that
integer is a normalized double

- public const int
**MIN_EXP**
Minimum negative integer such that
RADIX raised by power one less than that integer is a normalized double
- public const double
**NAN**
Indicates that the value is not-a-number (NaN)

### Static methods:

### Methods:

- public double
**abs** ()

- public double
**clamp** (double low, double high)

- public unowned string
**format** (char[] buffer, string format = "%g")
Converts a double to a string, using the '.

- public bool
**is_finite** ()
Determines if the given double has finite value i.e. it is normal, subnormal
or zero, but not infinite or NAN.

- public int
**is_infinity** ()
Determines if the given double is a negative or positive infinity

- public bool
**is_nan** ()
Determines if the double is not-a-number (NaN).

- public bool
**is_normal** ()
Determines if the given double is normal, i.e. is neither zero, subnormal,
infinite, nor NaN.

- public unowned string
**to_str** (char[] buffer)
Converts a double to a string, using the '.

- public string
**to_string** ()
Converts the value to its equivalent string representation