Double
A signed floating-point number.
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 |
Operator | Meaning |
---|---|
+ | Addition |
- | Subtraction or negation |
* | Multiplication |
/ | Division |
tcs> Double d = -2.3e-6 + 2.0 * 1e-3 tcs> print $d tcs> 1.9977e-3