| Applying science to business management |
  
Floating Point Numbers
All numbers in DScript are stored and manipulated in 8-byte
IEEE floating-point number format. The largest number you can
enter is ±1.7976931348623157×10^308. The smallest number is
±1×10^-307.
As you probably expect, you enter a number literal simply by
typing its digits. For example,
10
145.34
3.14159265359898
0.25
.25
Enter negative numbers by placing a Minus
sign (-) in front of the number. For example,
-145.34
You can enter a Plus sign
(+) in front of positive numbers if you want to do so for
clarity. However, a Plus sign
is never required.
For very large or small numbers, you will find it most
convenient to enter number literals using scientific notation:
1.56e23
3e6
7.34e-6
A number in scientific notation has the format
n1en2
which is equivalent to n1×10^n2. For example,
2.1e6 is the same as 2.1×10^6, or 2,100,000.
Although you can display numbers using 000 digit separators
(e.g., 1,500.00), you should never enter a comma in the number
literal because commas are used to separate arguments in a
function. For example, F(1,500)
means to call the function F with two arguments (1 and
500), not one argument with a value of 1,500.
Similarly, you can display negative numbers in parentheses
instead of using a negative sign. However, parentheses have a
special meaning in DScript, so they should not be used to
indicate sign in number literals.
Depending on the country in which you live, you may not use a
period as the decimal point and a comma as the list separator. If
this is so, DScript has probably already detected your computer
settings and adapted to your usual style of entering numbers.
To force DScript to use particular characters to represent
decimals and list separators, click System Options in the Tools
menu and then choose the Intl tab. This dialog page
presents options that allow you to override your computer's
international settings.
|