Books about CAS
|
01-31-2020, 07:52 PM
Post: #16
|
|||
|
|||
RE: Books about CAS
(01-31-2020 06:44 AM)Nad Wrote: Hello! It's actually using the full blown GMP library AFAIK Quote:For this reason I may go with my original plan of writing my own mixed C/assembly routines for multiple-precision integers and rationals. Hopefully it won't be too difficult. It won't be easy You'll need to use advanced methods suich as Karatsuba multiplication and / or FFT based multiplication if you want to operate on **extremely huge** numbers Quote: I will first do addition, followed by multiplication, then GCD. Subtraction and division then follow pretty easily. I'll need to brush up on GNU syntax assembly, as the MCUXpresso IDE uses the GNU ARM toolchain. Well, the GNU GMP library uses pairs of mpz_t integers to represent rationals, but, the numbers must be "canonicalized" so that the numerator and denominator don't share any factors and the denominator is positive You'll need to implement a GCD function first so you can prevent the integers representing the rational from becoming very large too quickly From the GMP manual : Code: Rational numbers are stored in objects of type mpq_t. Quote:But before that I need to determine the data types to use. A rational can be represented by a struct consisting of 2 multiple precision integers, which is what I think Bignum does. Yep Quote:3) Convert result to string for display. The only way I know to do that is to subtract multiples of powers of 10, keeping count as you go, until you reach zero. Well, one usually just uses a "modulo and divide loop" eg . : Code: loop: The above algorithm is naïve though, and much faster algorithms can be used. See eg. here . Regards, Jonathan Aeternitas modo est. Longa non est, paene nil. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Books about CAS - compsystems - 10-26-2019, 01:38 PM
RE: Books about CAS - Nad - 12-02-2019, 07:10 AM
RE: Books about CAS - Jonathan Busby - 01-10-2020, 09:55 PM
RE: Books about CAS - Nad - 01-12-2020, 06:26 AM
RE: Books about CAS - Jonathan Busby - 01-14-2020, 08:56 PM
RE: Books about CAS - Nad - 01-18-2020, 11:03 PM
RE: Books about CAS - Jonathan Busby - 01-19-2020, 04:38 PM
RE: Books about CAS - johanw - 05-02-2020, 09:45 PM
RE: Books about CAS - BruceH - 05-03-2020, 12:09 PM
RE: Books about CAS - Eddie W. Shore - 01-22-2020, 03:00 AM
RE: Books about CAS - Eddie W. Shore - 01-22-2020, 03:05 AM
RE: Books about CAS - Jonathan Busby - 01-23-2020, 04:29 PM
RE: Books about CAS - rprosperi - 01-23-2020, 09:51 PM
RE: Books about CAS - Nad - 01-24-2020, 12:13 AM
RE: Books about CAS - Jonathan Busby - 01-24-2020, 03:53 PM
RE: Books about CAS - Nad - 01-31-2020, 06:44 AM
RE: Books about CAS - Jonathan Busby - 01-31-2020, 06:39 PM
RE: Books about CAS - Jonathan Busby - 01-31-2020 07:52 PM
RE: Books about CAS - Nad - 02-01-2020, 05:20 AM
RE: Books about CAS - Jonathan Busby - 02-01-2020, 03:51 PM
RE: Books about CAS - Nad - 02-09-2020, 05:24 AM
RE: Books about CAS - F-73P - 05-01-2020, 02:42 AM
RE: Books about CAS - Nad - 05-06-2020, 05:08 AM
RE: Books about CAS - F-73P - 05-11-2020, 08:20 AM
RE: Books about CAS - compsystems - 05-06-2020, 05:39 PM
RE: Books about CAS - Jonathan Busby - 05-06-2020, 06:31 PM
RE: Books about CAS - Nad - 05-07-2020, 10:38 AM
RE: Books about CAS - jonmoore - 05-07-2020, 10:31 AM
RE: Books about CAS - Nad - 05-15-2020, 09:06 AM
RE: Books about CAS - John Keith - 05-15-2020, 06:13 PM
RE: Books about CAS - F-73P - 05-27-2020, 04:07 AM
RE: Books about CAS - Jonathan Busby - 05-27-2020, 07:00 PM
RE: Books about CAS - Nad - 05-17-2020, 07:12 AM
RE: Books about CAS - John Keith - 05-17-2020, 09:11 PM
RE: Books about CAS - Nad - 05-18-2020, 02:57 AM
RE: Books about CAS - F-73P - 06-03-2020, 05:14 AM
|
User(s) browsing this thread: 2 Guest(s)