diff --git a/src/basic/,stubs_math/b9ea.log_FAC1.s b/src/basic/,stubs_math/b9ea.log_FAC1.s index 8c6571d9..b2c293d4 100644 --- a/src/basic/,stubs_math/b9ea.log_FAC1.s +++ b/src/basic/,stubs_math/b9ea.log_FAC1.s @@ -18,3 +18,13 @@ log_FAC1: +STUB_IMPLEMENTATION + + +poly_log: + + !byte $03 ; series length - 1 + + +PUT_CONST_POLY_LOG_1 + +PUT_CONST_POLY_LOG_2 + +PUT_CONST_POLY_LOG_3 + +PUT_CONST_POLY_LOG_4 diff --git a/strings/0091146020 b/strings/0091146020 new file mode 100644 index 00000000..ce7137f7 --- /dev/null +++ b/strings/0091146020 @@ -0,0 +1 @@ +Part of the polynomial for log approximation. This is a well known polynomial taken from the book "Computer Approximations" by John Fraser Hart et al. (ISBN 0-88275-642-7) according to https://www.c64-wiki.com/wiki/POLY1 diff --git a/strings/037F5E56CB7980139B0B6480763893168238AA3B20 b/strings/037F5E56CB7980139B0B6480763893168238AA3B20 new file mode 100644 index 00000000..ce7137f7 --- /dev/null +++ b/strings/037F5E56CB7980139B0B6480763893168238AA3B20 @@ -0,0 +1 @@ +Part of the polynomial for log approximation. This is a well known polynomial taken from the book "Computer Approximations" by John Fraser Hart et al. (ISBN 0-88275-642-7) according to https://www.c64-wiki.com/wiki/POLY1 diff --git a/tools/generate_constants.cc b/tools/generate_constants.cc index c9a4a7e4..e16e577a 100644 --- a/tools/generate_constants.cc +++ b/tools/generate_constants.cc @@ -78,6 +78,12 @@ std::vector GLOBAL_constants = ConstEntry( "POLY_EXP_6", 0.24022638460 ), ConstEntry( "POLY_EXP_7", 0.69314718618 ), ConstEntry( "POLY_EXP_8", 1.0 ), + + // Constants for log approximation, source as for exp above + ConstEntry( "POLY_LOG_1", 0.43425594189 ), + ConstEntry( "POLY_LOG_2", 0.57658454124 ), + ConstEntry( "POLY_LOG_3", 0.96180075919 ), + ConstEntry( "POLY_LOG_4", 2.8853900731 ), }; //