Post Reply 
A quick precision test
06-05-2014, 09:08 PM
Post: #46
RE: A quick precision test
(06-05-2014 12:06 PM)Paul Dale Wrote:  As an example (which isn't related to rounding), what does COS(1.57079632679489661923132169163975144) equal? Is it 2.09858469968755291048739331660132323e-36 or something different? I cheated here and downloaded your (rather nice BTW) newRPL demo and it gets the last thirteen digits incorrect. TAN of the same value loses fourteen digits and this answer is a huge number rather than something very tiny.

My original 34S test case was COS(1.570796326794896619231321691639751) where newRPL gets the last ten digits incorrect -- the 34S gets more digits incorrect here. With more memory available, I'd fix this.


- Pauli

2 things: the first demo came out with a bug that returns the TAN of PI/2-Arg instead of TAN(arg) (among several other bugs I've already fixed), I'll publish a new demo this weekend, now with DOLIST [end of shameless advertising].
I did your test:
COS(1.57079632679489661923132169163975144)

and I got
2.098584699687552910487472296153908

What makes you think those digits are incorrect? I did the same with preccalc (from sourceforge, very nice calc for windows), and it gives me the exact same value.
I've also increased precision to many more digits (keeping the argument at 36 digits they way you have it) and still the same result.

newRPL does lose digits, of course, it's part of the implementation, but in this case, your angle is in the order of 10^-35 difference with PI/2, so I'm losing 35 digits, but you can only see them at maximum precision (2016 digits).
I for instance ran it at 2016-35=1981 digits precision and still gave me identical results as preccalc, up to the very last digit.
If I run it at 2016 digits, I can clearly see the last 35 digits are garbage.

I've also checked with Wolfram Alpha, and... exact same number! (I checked up to 36 digits only, the others are left to the reader to compare...)

hint: Alpha won't give you more than the number of digits you input, so it will show only 5 digits unless you add lots of trailing zeros to the input argument.

I also tried your COS() case with 34 digits and once more, it agrees with preccalc and Alpha on all 34 digits.

I think you are taking for granted some results as "correct" that are perhaps not too good?

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


Messages In This Thread
A quick precision test - pito - 06-02-2014, 10:37 PM
RE: A quick precison test - Paul Dale - 06-02-2014, 11:04 PM
RE: A quick precison test - pito - 06-03-2014, 12:07 AM
RE: A quick precison test - Paul Dale - 06-03-2014, 12:13 AM
RE: A quick precison test - pito - 06-03-2014, 12:27 AM
RE: A quick precison test - Paul Dale - 06-03-2014, 12:36 AM
RE: A quick precision test - Claudio L. - 06-04-2014, 01:25 PM
RE: A quick precision test - walter b - 06-04-2014, 01:33 PM
RE: A quick precision test - Claudio L. - 06-04-2014, 01:42 PM
RE: A quick precision test - Paul Dale - 06-04-2014, 09:47 PM
RE: A quick precison test - walter b - 06-03-2014, 11:24 AM
RE: A quick precision test - Dieter - 06-04-2014, 01:08 PM
RE: A quick precision test - walter b - 06-04-2014, 01:23 PM
RE: A quick precison test - HP67 - 06-03-2014, 09:06 AM
RE: A quick precision test - everettr - 06-03-2014, 02:11 PM
RE: A quick precison test - pito - 06-03-2014, 07:23 AM
RE: A quick precison test - HP67 - 06-03-2014, 11:50 AM
RE: A quick precison test - Paul Dale - 06-03-2014, 12:25 PM
RE: A quick precision test - walter b - 06-03-2014, 01:52 PM
RE: A quick precision test - Paul Dale - 06-03-2014, 10:10 PM
RE: A quick precison test - HP67 - 06-03-2014, 12:41 PM
RE: A quick precision test - HP67 - 06-03-2014, 01:01 PM
RE: A quick precision test - walter b - 06-03-2014, 01:56 PM
RE: A quick precision test - pito - 06-04-2014, 01:38 PM
RE: A quick precision test - Claudio L. - 06-04-2014, 02:17 PM
RE: A quick precision test - Paul Dale - 06-04-2014, 10:09 PM
RE: A quick precision test - Claudio L. - 06-05-2014, 01:18 AM
RE: A quick precision test - Paul Dale - 06-05-2014, 02:00 AM
RE: A quick precision test - Claudio L. - 06-05-2014, 11:03 AM
RE: A quick precision test - Dieter - 06-05-2014, 11:23 AM
RE: A quick precision test - Paul Dale - 06-05-2014, 12:06 PM
RE: A quick precision test - Claudio L. - 06-05-2014 09:08 PM
RE: A quick precision test - Paul Dale - 06-05-2014, 10:09 PM
RE: A quick precision test - Claudio L. - 06-06-2014, 12:57 AM
RE: A quick precision test - Claudio L. - 06-06-2014, 01:15 AM
RE: A quick precision test - Paul Dale - 06-06-2014, 01:35 AM
RE: A quick precision test - pito - 06-06-2014, 11:16 AM
RE: A quick precision test - Claudio L. - 06-06-2014, 12:04 PM
RE: A quick precision test - Paul Dale - 06-06-2014, 10:55 PM
RE: A quick precision test - pito - 06-07-2014, 11:56 AM
RE: A quick precision test - Paul Dale - 06-07-2014, 12:20 PM
RE: A quick precision test - pito - 06-07-2014, 04:44 PM
RE: A quick precision test - walter b - 06-08-2014, 05:28 PM
RE: A quick precision test - Claudio L. - 06-05-2014, 09:25 PM
RE: A quick precision test - Paul Dale - 06-05-2014, 10:20 PM
RE: A quick precision test - Claudio L. - 06-06-2014, 01:03 AM
RE: A quick precision test - Paul Dale - 06-06-2014, 01:46 AM
RE: A quick precision test - pito - 06-04-2014, 02:12 PM
RE: A quick precision test - pito - 06-04-2014, 02:31 PM
RE: A quick precision test - pito - 06-05-2014, 08:49 PM
RE: A quick precision test - walter b - 06-05-2014, 09:07 PM
RE: A quick precision test - pito - 06-05-2014, 09:13 PM
RE: A quick precision test - Mark Hardman - 06-05-2014, 09:21 PM
RE: A quick precision test - pito - 06-06-2014, 12:19 PM
RE: A quick precision test - pito - 06-08-2014, 12:44 PM
RE: A quick precision test - walter b - 06-08-2014, 01:57 PM
RE: A quick precision test - pito - 06-08-2014, 02:07 PM
RE: A quick precision test - walter b - 06-08-2014, 03:00 PM
RE: A quick precision test - Paul Dale - 06-08-2014, 10:46 PM



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