Sharp OZ-707 Operation Manual - Page 25
Defdbl
![]() |
UPC - 074000012141
View all Sharp OZ-707 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 25 highlights
Double-precision variables have 20 significant digits and a 2 digit exponent from -99 to 99. Note: Single-character variables to which the sharp mark is appended (e.g. A#) are not fixed numeric variables, but are treated as double-precision simple numeric variables. The following types of variables are stored in separate memory areas: A and AB and X(10) and A# AB# X#(10) Variables can be specified as single-precision (10-significant-digit) variables by appending an exclamation mark ( ! ), or as double-precision (20-significant-digit) variables by the sharp mark (#). However, the Card makes it possible to treat any numeric variable as a single- or double-precision variable by the DEFSNG (define single) and DEFDBl (define double) statements. This is especially useful if your program contains numerous double-precision variables. Storing Values In Double-Precision Variables 1. Using Declarative Signs (I and #) AB! (or AB) = 1234567891234567891234 ~ 1.234567891 x 1021 The value is stored using 10 significant digits in the single-precision variable ABI (or AB). AB# = 1234567891234567891234 ~ 1.2345678912345678912 x 1021 The value is stored using 20 significant digits in the double-precision variable AB#. 2. Using Declarative Signs and Declarative Statements (DEFSNG and DEFDBl) These are two BASIC commands used as variable definition statements. See Chapter 3 for a description of programming. 38 Mixing Double- and Single-Precision Values If a calculation includes double-precision variables, the Card will automatically select double-precision mode where necessary. Double-precision mode is automatically selected in the following cases: Calculations are executed on values containing 11 or more significant digits: Ex. 1234567891234 x 5 The letter D is used in formulas to specify an exponent: Ex. TAN 7.43005 Values are identified using the sharp mark (#): Ex. 4#{l Double-precision variables are used: Ex. AB# + BC The DEFDBl statement is used: Ex. In RUN mode, enter DEFDBL. DBl is highlighted in the MODE CHECK display. DEFDBl IENTER I 51: 191ENTERI DEFDBL 5/ 9 5.55555555555555 55556D-01 If the calculation formula contains a mixture of single- and double-precision values, each individual calculation within the formula is executed according to the degree of precision valid at that time. + 4#{l Single-precision Double-precision Double-precision calculation If double-precision values are converted to single-precision variables, the double-precision value is rounded to 10 significant digits. 39
![](/manual_guide/products/sharp-oz707-operation-manual-7aa0508/25.png)