Update const_PI

Allow a patched best rounded value or the original value from the MS BASIC
This commit is contained in:
Rikard Nordgren authored and FeralChild64 committed 2026-05-09 17:01:44 +02:00
1 parent d20725cc81
commit d65db6a049
3 files changed
+16 -2

No files matched your search

+2
View File
@@ -52,6 +52,8 @@ std::vector<ConstEntry> GLOBAL_constants =
ConstEntry( "HALF_PI", M_PI / 2.0 ),
ConstEntry( "PI", M_PI ),
ConstEntry( "PI_MS", 3.1415926529 ), // This is the value of PI used in the Microsoft BASIC. It is only the third closest approximation
ConstEntry( "DOUBLE_PI", M_PI * 2.0 ),
ConstEntry( "SQR_2", std::sqrt(2.0) ),
ConstEntry( "INV_SQR_2", 1.0 / std::sqrt(2.0) ),
+2 -1
View File
@@ -20,9 +20,10 @@ int matches[MAX_SIZE];
int phase_mask[MAX_SIZE+MAX_SIZE];
#define NUM_CHUNKS 13
#define NUM_CHUNKS 14
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
0xAEA8, 0xAEAC,
0xB248, 0xB24C,
0xB391, 0xB39D,
0xB3A2, 0xB3A5,