From ea434f9e389c3a372942bb40cfcc74fe52212f28 Mon Sep 17 00:00:00 2001 From: Rikard Nordgren Date: Sun, 12 Apr 2026 21:23:05 +0200 Subject: [PATCH] Update poly_log --- src/basic/math_trans/{poly_log.s => b9c1.poly_log.s} | 5 +++++ tools/similarity.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) rename src/basic/math_trans/{poly_log.s => b9c1.poly_log.s} (63%) diff --git a/src/basic/math_trans/poly_log.s b/src/basic/math_trans/b9c1.poly_log.s similarity index 63% rename from src/basic/math_trans/poly_log.s rename to src/basic/math_trans/b9c1.poly_log.s index 3f770ac9..139d4c83 100644 --- a/src/basic/math_trans/poly_log.s +++ b/src/basic/math_trans/b9c1.poly_log.s @@ -3,8 +3,13 @@ ;; #LAYOUT# * BASIC_0 #TAKE ;; #LAYOUT# * * #IGNORE + +; This file is under the MIT license, it contains code released by Microsoft Corporation. +; See LICENSE for more information. + ; Polynomial for the logarithm function +; This is verified to be identical to the original Microsoft implementation where it was named LOGCN2 !ifdef CONFIG_TRANSCENDENTAL_FUNCTIONS { diff --git a/tools/similarity.c b/tools/similarity.c index 27ce8909..8fabb438 100644 --- a/tools/similarity.c +++ b/tools/similarity.c @@ -20,13 +20,14 @@ int matches[MAX_SIZE]; int phase_mask[MAX_SIZE+MAX_SIZE]; -#define NUM_CHUNKS 9 +#define NUM_CHUNKS 10 // 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, 0xB3A2, 0xB3A5, 0xB849, 0xB97D, 0xB983, 0xB9BB, + 0xB9C1, 0xB9D5, 0xBA28, 0xBCF2, 0xBD7E, 0xBD90, 0xBDB3, 0xBDC1,