multiple precision arithmetic 
Author Message
 multiple precision arithmetic

Does anybody know of a program that performs arithmetic operations
on numbers represented as integer arrays?
ie: array1[5]={1,4,2,3,1} and array2[4]={3,4,1,4} perform
addition, multiplication, division, etc...

Thanks!

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 multiple precision arithmetic


Quote:
>Does anybody know of a program that performs arithmetic operations
>on numbers represented as integer arrays?
>ie: array1[5]={1,4,2,3,1} and array2[4]={3,4,1,4} perform
>addition, multiplication, division, etc...

In <URL: http://www.merlyn.demon.co.uk/programs/>, longcalc does this,
except that it is sufficient to use arrays of byte.

It is unsuitable for copying as an answer to course-work, however.

--

 Web <URL: http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
 PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/> - see 00index.txt.
 Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)



Wed, 18 Jun 1902 08:00:00 GMT  
 multiple precision arithmetic

Quote:

> Does anybody know of a program that performs arithmetic operations
> on numbers represented as integer arrays?
> ie: array1[5]={1,4,2,3,1} and array2[4]={3,4,1,4} perform
> addition, multiplication, division, etc...

> Thanks!

> Sent via Deja.com http://www.deja.com/
> Before you buy.

I made a a Pascal program using arrays of integers to represent
precision numbers. It was my machine problem for my programming course.
The program has to calculate for the value of pi in 30 decimal places.
I used the infinite series expansion of inverse tangent. I used

arctan(1/2) + arctan(1/3) = pi/4

The expansion converges very easily.

The idea is to define a procedure that to do the arithmetic such as:

procedure mult_array(array1,array2:array_of_ints; var
array3:array_of_int);

procedure divide_array(array1,array2:array_of_ints; var
array3:array_of_int);

etc..

Took me a some time to make it work within my specs.

S

P

O

I

L

E

R

S

P

A

C

E

I kinda lost the source code but I'll keep on searching. I think i still
have a hard-copy of that sh*t. It's been years ago, like 1991.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Arithmetic in multiple precision

2. getting high precision arithmetic for BP7

3. High Precision Arithmetic

4. Rounding Off or Precision Error

5. Currency Field lossing precision

6. Precision Timer

7. Real precision

8. HELP !!! Table field precision

9. Precision calculations

10. proper way to use single and double precision?

11. Precision of 'Reall datatype

12. Conversion of double precision

 

 
Powered by phpBB® Forum Software