Index

Double

A signed floating-point number.

Input Format:

The following are all examples of valid ways to enter the number 123.125:

Example Description
-123.125 A simple floating point number
-123:07:30.0 The same number entered in sexagesimal notation
-1.23125e2 The same number entered in exponential notation

When a number is entered using sexagesimal notation, any number of sexagesimal components can be used. Each additional colon causes the number to the right of it to be divided by 60 compared to the numbers to the left of it. So in sexagesimal notation the following ways are all valid ways to enter the same number:

Example Meaning
0.03125 0.03125
0:1.875 0 + 1.875/60
0:1:52.5 0 + 1/60 + 52.5/60/60
0:1:52:30 0 + 1/60 + 52/60/60 + 30/60/60/60
0:1:52:30:00 0 + 1/60 + 52/60/60 + 30/60/60/60 + 0/60/60/60/60

Operators:
The following arithmetic operators are supported, with the usual rules of precedence:

Operator Meaning
+ Addition
- Subtraction or negation
* Multiplication
/ Division

Use with do-loops:
When a Double variable is used as the dependent variable of a do-loop, the associated loop increment is also an Double.

Examples:
 tcs> Double d = -2.3e-6 + 2.0 * 1e-3
 tcs> print $d
 tcs> 1.9977e-3

Martin Shepherd (17-Mar-2010)