Add floating point constants for FOUT
This commit is contained in:
1 parent
b10f51345a
commit
abd67c40f9
3 files changed
+31
-1
No files matched your search
@@ -58,6 +58,11 @@ std::vector<ConstEntry> GLOBAL_constants =
|
||||
ConstEntry( "LOG_2", std::log(2.0) ),
|
||||
ConstEntry( "INV_LOG_2", 1.0 / std::log(2.0) ),
|
||||
|
||||
// Constants for FOUT
|
||||
ConstEntry( "NZ0999", 99999999.9 ), // Comment in MS-BASIC says 99999999.9499, but that is off by one ulp
|
||||
ConstEntry( "NZ9999", 999999999.2 ), // Comment is MS-BASIC says 999999999.499, but that is off by one ulp
|
||||
ConstEntry( "NZMIL", 1e9 ),
|
||||
|
||||
// Constants for exp approximation, taken from https://www.c64-wiki.com/wiki/POLY1
|
||||
// original source is probably "Computer Approximations" by John Fraser Hart et al. (ISBN 0-88275-642-7)
|
||||
ConstEntry( "POLY_EXP_1", 2.1498763701e-5 ),
|
||||
|
||||
+2
-1
@@ -20,7 +20,7 @@ int matches[MAX_SIZE];
|
||||
|
||||
int phase_mask[MAX_SIZE+MAX_SIZE];
|
||||
|
||||
#define NUM_CHUNKS 8
|
||||
#define NUM_CHUNKS 9
|
||||
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
|
||||
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||
0xB391, 0xB39D,
|
||||
@@ -29,6 +29,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||
0xB983, 0xB9BB,
|
||||
0xBA28, 0xBCF2,
|
||||
0xBD7E, 0xBD90,
|
||||
0xBDB3, 0xBDC1,
|
||||
0xBF11, 0xBF51,
|
||||
0xBFB4, 0xBFBE,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user