Included library (transcendental functions for decimal 1000-digit mode)

Some librares are included in the Library folder of Decimal BASIC.
In BASIC's "Open File" menu, select "Library" as the "File Type" and select the Library folder. The LIB files will be displayed.
When using a library, add a MERGE statement to the end of the program specifying the library file name.
When you write a MERGE statement, it adds the specified library to the program and translates it.
Note. The library name is the file name, so be careful when using it on operating systems such as Linux, which distinguish between upper or lower case in alphabetic characters in file names.

If you choose the option -Decimal 1000-digit mode (using transcendental functions) in the numeric menu, or write OPTION ARITHMETIC DECIMAL_HIGH, you will be able to use transcendental functions in Decimal 1000-digit mode, but the accuracy will be the same as in Decimal mode.
If you need high-precision calculations in decimal 1000-digit mode, use the external functions in the included library. However, keep in mind that this is a library that calculates in decimal 1000 digits, so the number of digits at the end may be incorrect. 。


TRIGONOM.LIB

TRIGONOM.LIB defines the sine, cosine, and tangent functions.
The function names are SIN, COS, and TAN, respectively, the same as the embedded functions, so an external function declaration is required, as shown in line 20 of the following example.

Example: Find sin(1)

10 OPTION ARITHMETIC DECIMAL_HIGH
20 DECLARE EXTERNAL FUNCTION SIN
30 LET x=1
40 PRINT SIN(x)
50 END
60 MERGE "TRIGONOM.LIB"

exp.LIB

exp.LIB defines the exp function to use in decimal 1000 digit mode.
Example

10 OPTION ARITHMETIC DECIMAL_HIGH
20 DECLARE EXTERNAL FUNCTION exp
30 PRINT EXP(1)
40 END 
50 MERGE "exp.LIB"

log.LIB

log.LIB defines the natural logarithm log to use in decimal 1000 digit mode.

10 OPTION ARITHMETIC DECIMAL_HIGH
20 DECLARE EXTERNAL FUNCTION log
30 PRINT LOG(10)
40 END
50 MERGE "log.LIB"

LOGpaper.BAS

LOGpaper.BAS is a regular (not a library) program that prints logarithmic graph paper.
It can be run in decimal mode. .


Back