version 1.4, 2007/08/28 19:15:03
|
version 1.5, 2007/08/28 19:26:11
|
Line 41
|
Line 41
|
|
|
\ There are a few things to be noted: |
\ There are a few things to be noted: |
|
|
\ - Following the despicable practice of the original, this version |
\ - Loading ttester.fs does not change BASE. Loading tester.fs |
\ sets the base to HEX for everything that gets loaded later. |
\ changes BASE to HEX (like the original tester). Floating-point |
\ Floating-point input is ambiguous when the base is not decimal, so |
\ input is ambiguous when the base is not decimal, so you have to set |
\ you have to set it to decimal yourself when you want to deal with |
\ it to decimal yourself when you want to deal with decimal numbers. |
\ decimal numbers. |
|
|
|
\ - For FP it is often useful to use approximate equality for checking |
\ - For FP it is often useful to use approximate equality for checking |
\ the results. You can turn on approximate matching with SET-NEAR |
\ the results. You can turn on approximate matching with SET-NEAR |
Line 101 HAS-FLOATING [IF]
|
Line 100 HAS-FLOATING [IF]
|
\ SET THE FOLLOWING TO THE RELATIVE AND ABSOLUTE TOLERANCES YOU |
\ SET THE FOLLOWING TO THE RELATIVE AND ABSOLUTE TOLERANCES YOU |
\ WANT FOR APPROXIMATE FLOAT EQUALITY, TO BE USED WITH F~ IN |
\ WANT FOR APPROXIMATE FLOAT EQUALITY, TO BE USED WITH F~ IN |
\ FNEARLY=. KEEP THE SIGNS, BECAUSE F~ NEEDS THEM. |
\ FNEARLY=. KEEP THE SIGNS, BECAUSE F~ NEEDS THEM. |
FVARIABLE FSENSITIVITY DECIMAL 1E-12 HEX FSENSITIVITY F! |
FVARIABLE REL-NEAR DECIMAL 1E-12 HEX REL-NEAR F! |
: REL-NEAR FSENSITIVITY ; |
|
FVARIABLE ABS-NEAR DECIMAL 0E HEX ABS-NEAR F! |
FVARIABLE ABS-NEAR DECIMAL 0E HEX ABS-NEAR F! |
|
|
\ WHEN EXACT? IS TRUE, }F USES FEXACTLY=, OTHERWISE FNEARLY=. |
\ WHEN EXACT? IS TRUE, }F USES FEXACTLY=, OTHERWISE FNEARLY=. |