Post Reply 
Faster inverse gamma and factorial for the WP 34S
02-16-2015, 09:43 PM
Post: #38
RE: Faster inverse gamma and factorial for the WP 34S
(02-16-2015 09:09 PM)Dieter Wrote:  I wonder where these constants (recalled by CNST→J) are stored.

They are in compile_consts.c:

Code:
#ifdef INCLUDE_XROM_DIGAMMA
    SYSCONST("DG02",    "DG02",        "-12"),
    SYSCONST("DG04",    "DG04",        "120"),
    SYSCONST("DG06",    "DG06",        "-252"),
    SYSCONST("DG08",    "DG08",        "240"),
    SYSCONST("DG10",    "DG10",        "-132"),
    SYSCONST("DG12",    "DG12",        "47.40955137481910274963820549927641099855282199710564"),
    SYSCONST("DG14",    "DG14",        "-12"),
    SYSCONST("DG16",    "DG16",        "2.25601327066629803704727674868675698092341719657174"),
    SYSCONST("DG18",    "DG18",        "-0.32744432033191237148653885608771969817858526910889"),
    SYSCONST("DG20",    "DG20",        "0.03779830594865157407036211922502018773158621163615"),
#ifdef XROM_DIGAMMA_DOUBLE_PRECISION
    SYSCONST("DG22",    "DG22",        "-0.00355290089208707181751477157164373157576303695789"),
    SYSCONST("DG24",    "DG24",        "0.00027719946681748709451809242885375511629640900063"),
    SYSCONST("DG26",    "DG26",        "-0.000018238994666613976237629781846424625074665884416450965222"),
    SYSCONST("DG28",    "DG28",        "0.000001025707487435377285588673305803802205519095192937062420"),
    SYSCONST("DG30",    "DG30",        "-0.000000049868606702005666912020069073686577470166427786528917"),
    SYSCONST("DG32",    "DG32",        "0.0000000021169179377466567237109532498135231238180401887003845789189798"),
    SYSCONST("DG34",    "DG34",        "-0.0000000000791406916620372916230853867700251482720064744876389233715498"),
#endif
#endif

Quote:Is it possible to generate custom constants in XROM code?

As in constants from the CNST function? Then yes. There are a number of such constants in compile_consts.c -- look for most of the SYSCONST entries. Due to some thoughtful code by Marcus, these are stored in either single or double precision -- the smaller format is used if possible.


- Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Faster inverse gamma and factorial for the WP 34S - Paul Dale - 02-16-2015 09:43 PM



User(s) browsing this thread: 1 Guest(s)