Add the polynomial used by exp
This commit is contained in:
1 parent
46ccd6fbc8
commit
99e5e26c7b
4 files changed
+32
-1
No files matched your search
@@ -97,7 +97,7 @@
|
|||||||
; --- Software features
|
; --- Software features
|
||||||
|
|
||||||
;; #CONFIG# PANIC_SCREEN YES
|
;; #CONFIG# PANIC_SCREEN YES
|
||||||
;; #CONFIG# DOS_WEDGE YES
|
;; #CONFIG# DOS_WEDGE NO
|
||||||
;; #CONFIG# TAPE_WEDGE YES
|
;; #CONFIG# TAPE_WEDGE YES
|
||||||
;; #CONFIG# TAPE_HEAD_ALIGN NO
|
;; #CONFIG# TAPE_HEAD_ALIGN NO
|
||||||
;; #CONFIG# BCD_SAFE_INTERRUPTS YES
|
;; #CONFIG# BCD_SAFE_INTERRUPTS YES
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
;; #LAYOUT# STD * #TAKE
|
||||||
|
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||||
|
;; #LAYOUT# * BASIC_0 #TAKE
|
||||||
|
;; #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
; Polynomial for the exponential function
|
||||||
|
|
||||||
|
poly_exp:
|
||||||
|
|
||||||
|
!byte $07 ; series length - 1
|
||||||
|
|
||||||
|
+PUT_CONST_POLY_EXP_1
|
||||||
|
+PUT_CONST_POLY_EXP_2
|
||||||
|
+PUT_CONST_POLY_EXP_3
|
||||||
|
+PUT_CONST_POLY_EXP_4
|
||||||
|
+PUT_CONST_POLY_EXP_5
|
||||||
|
+PUT_CONST_POLY_EXP_6
|
||||||
|
+PUT_CONST_POLY_EXP_7
|
||||||
|
+PUT_CONST_POLY_EXP_8
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
This is the polyonmial for the exponential function. According to https://www.c64-wiki.com/wiki/POLY1 this was most likely taken from the book "Computer Approximations" by John Fraser Hart et al. (ISBN 0-88275-642-7). This is then a well known polynomial.
|
||||||
@@ -67,6 +67,17 @@ std::vector<ConstEntry> GLOBAL_constants =
|
|||||||
ConstEntry( "POLY_SIN_4", 0.00833332926445715285723741015926085083 ),
|
ConstEntry( "POLY_SIN_4", 0.00833332926445715285723741015926085083 ),
|
||||||
ConstEntry( "POLY_SIN_5", -0.166666665414391662957238076832950332 ),
|
ConstEntry( "POLY_SIN_5", -0.166666665414391662957238076832950332 ),
|
||||||
ConstEntry( "POLY_SIN_6", 0.99999999988985190065414932682350994 ),
|
ConstEntry( "POLY_SIN_6", 0.99999999988985190065414932682350994 ),
|
||||||
|
|
||||||
|
// 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 ),
|
||||||
|
ConstEntry( "POLY_EXP_2", 1.4352314037e-4 ),
|
||||||
|
ConstEntry( "POLY_EXP_3", 1.3422634825e-3 ),
|
||||||
|
ConstEntry( "POLY_EXP_4", 9.6140170135e-3 ),
|
||||||
|
ConstEntry( "POLY_EXP_5", 5.5505126860e-2 ),
|
||||||
|
ConstEntry( "POLY_EXP_6", 0.24022638460 ),
|
||||||
|
ConstEntry( "POLY_EXP_7", 0.69314718618 ),
|
||||||
|
ConstEntry( "POLY_EXP_8", 1.0 ),
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in new issue
Block a user