double

Syntax double (value)

Params value is the object whose datatype you wish to coerce to doubleType.

Action Coerces the datatype of value to be double-precision floating-point if possible.

Returns The coerced value if coercion is successful; otherwise an error.

Examples double (32768)

   » 32768.0

double (".005")

   » 0.005

double (clock.now ())

   » -1523471148.0 // a fairly random number

Errors If value is an improperly formatted string or a type that cannot be coerced to a number, an error message is generated.

Notes See the discussion of datatypes in Chapter 1 of the UserTalk Reference Guide for information on the range of values that can be represented by a double-precision floating-point number and for other details.

Discuss