Post Reply 
WP 34S vs. DM42 decimal128 differences?
03-29-2018, 04:03 PM
Post: #10
RE: WP 34S vs. DM42 decimal128 differences?
To Pauli, and anyone else interested in this:

I've got full precision working correctly with just one 69-digit decNumber - x, in cvt_2rad_sincos. sincosTaylor itself isn't changed; its arguments are still pointers to SINCOS-digit decNumbers and the calculations in it are carried out to this precision.

I divide radian arguments to cvt_2rad_sincos by \(2\pi\) to 69-digit precision, and then do range reduction as with degrees and grads using fractions of a full circle as the thresholds. This means that any radian arguments that have a very small sine or cosine are mapped onto angles near zero, and so 69-digit precision isn't needed to calculate these functions correctly. I've included the constant 0.125 in consts.h and compile_consts.c for use as the \(45^\circ\) threshold.

I don't know whether the memory requirements will still be a problem. I've attached the modified source files in case you want to try them out yourself - if you don't, or you have a better approach of your own, that's fine as well!

Nigel (UK)


Attached File(s)
.txt  consts.h.txt (Size: 7.56 KB / Downloads: 3)
.txt  decn.c.txt (Size: 50.33 KB / Downloads: 3)
.txt  compile_consts.c.txt (Size: 33.12 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: WP 34S vs. DM42 decimal128 differences? - Nigel (UK) - 03-29-2018 04:03 PM



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