@Thomas Klemm -> CORDIC Article
06-04-2014, 05:57 PM
Post: #23
 Claudio L. Senior Member Posts: 1,887 Joined: Dec 2013
RE: @Thomas Klemm -> CORDIC Article
(06-03-2014 02:02 PM)pito Wrote:  I've flashed my CM3 with the old stuff I've found - when running below code with 34digits I get (I've added your result for comparison):

Code:
TRIG9 TRIG9= 9.000 000 000 000 000 000 000 000 000 000 227 yours: 8.999 999 999 999 999 999 999 999 999 937 535 Elapsed x1 =201 ms

Code:
#define _PI  "3.1415926535897932384626433832795028841971693993751" //  TRIG9 PRECISION TEST cout<<"TRIG9"<<endl; decfp tmp, PI; PI = _PI; tmp = "9.0";  // 9 DEGREE // deg to rad timer = millis; tmp = tmp *  PI / "180.0"; tmp = arcsin ( arccos ( arctan ( tan ( cos ( sin ( tmp ) ) ) ) ) ) ; // rad to deg tmp = tmp * "180.0" / PI; timer = millis - timer; cout<<"TRIG9= "<<tmp<<endl; cout<<"Elapsed x1 ="<<timer<<" ms"<<endl;

But I've learned you do rounding after each calculation so maybe that is what makes the diff..

Does anyone know of a table of correct values for this?
newRPL gave me (for 34 digits):

8.999999999999999999999999999999979

I ran a loop from 9 to 900 digits, and the difference is always only the last 2 digits, being the worst difference 85 ULP.

But how do we know right from wrong?

Claudio
 « Next Oldest | Next Newest »

 Messages In This Thread @Thomas Klemm -> CORDIC Article - Tugdual - 05-31-2014, 08:00 PM RE: @Thomas Klemm -> CORDIC Article - brouhaha - 06-01-2014, 02:27 AM RE: @Thomas Klemm -> CORDIC Article - Thomas Klemm - 06-01-2014, 07:32 AM RE: @Thomas Klemm -> CORDIC Article - Tugdual - 06-01-2014, 11:57 AM RE: @Thomas Klemm -> CORDIC Article - Paul Dale - 06-01-2014, 12:12 PM RE: @Thomas Klemm -> CORDIC Article - Thomas Klemm - 06-01-2014, 07:32 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 04:31 PM RE: @Thomas Klemm -> CORDIC Article - Tugdual - 06-01-2014, 07:48 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-01-2014, 08:28 PM RE: @Thomas Klemm -> CORDIC Article - Marcus von Cube - 06-02-2014, 08:47 PM RE: @Thomas Klemm -> CORDIC Article - Thomas Klemm - 06-02-2014, 06:39 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-02-2014, 10:13 PM RE: @Thomas Klemm -> CORDIC Article - Paul Dale - 06-02-2014, 10:26 PM RE: @Thomas Klemm -> CORDIC Article - Tugdual - 06-02-2014, 10:53 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-02-2014, 10:58 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-02-2014, 11:05 PM RE: @Thomas Klemm -> CORDIC Article - Paul Dale - 06-02-2014, 11:08 PM RE: @Thomas Klemm -> CORDIC Article - Tugdual - 06-02-2014, 11:13 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-02-2014, 11:20 PM RE: @Thomas Klemm -> CORDIC Article - Paul Dale - 06-02-2014, 11:42 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-03-2014, 02:02 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014 05:57 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 02:52 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 06:06 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 06:21 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 06:30 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 06:37 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 06:45 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 07:16 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 07:36 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 07:30 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 07:41 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 07:51 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 09:05 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 08:12 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 08:34 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 09:21 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 09:21 PM RE: @Thomas Klemm -> CORDIC Article - Claudio L. - 06-04-2014, 09:39 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 09:33 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 09:41 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 09:50 PM RE: @Thomas Klemm -> CORDIC Article - pito - 06-04-2014, 10:46 PM

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