|
-
July 27th, 2012, 09:47 AM
#1
VeryLong Fractions
Hi,
I think, I invented the wheel the thousandst time by writinig a very long integer-Library.
Now I wonder how to work with divisions. Of course you can divide with integers and look at the rest.
It is also easy to think about a fraction as a set ot two integers, implementing the known rules for adding, multiplying, ... them.
An other approach is to work with very long integers and remember the position of the comma.
Disadvantage of this is, that you cannot divide by 3 exactly. I do not know how to proceed.
Is there any description of a library working with very long fractions or very long decimal fractions?
A very interesting question is, how to implement the rounding in the different models.
Continued fraction maybe?
Whatever: I am shure that somebody thought about these problems, but with Google i need some keywords to search for. Any hints?
Best Regards
GMarco
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|