Extensions to my BigInteger and BigRational classes

J

jehugaleahsa

Hello:

I am currently working on a some simple (not really) classes called
BigInteger and BigRational. They are pretty much identical to Java's
BigInteger and BigDecimal classes, respectfully.

BigRational is really simple and it just maintains a dividend and
denominator and then prints out the decimal form when done with the
calculation.

However, I want to have something that can handle irrationals also.
Without them, I can't perform powers to decimals; i.e., 2^(1/2). This
is kind of inhibiting. That also means I can't do some trig functions
also.

Would it be possible for me to maintain the denominator and dividend
as pairs of (BigInteger, BigRational)? It would allow me to represent
what I am asking for, but how would I actually get a value out of it;
i.e., x^(1/2) + x^(1/5) = ???.

Is there some where I can learn how to represent irrationals and still
maintain arbitrary precision numbers? or am I asking for something
impossible?

Thanks,
Travis
 
F

Fred Mellender

You need to limit the scope of what you are trying to do. Otherwise,
you will need to implement a full symbolic algebra system (like Maple or
Mathematica) and use combining/simplifying/factoring/equation solving logic
to handle the most general cases.

You could limit yourself to dealing with square roots and perhaps other
irrationals. Then you could look into "continued fraction arithmetic". Do
a Google search on that for some ideas.

But take warning by looking at
http://www.math.utexas.edu/pipermail/maxima/2007/005351.html
 
J

jehugaleahsa

You need to limit the scope of what you are trying to do. Otherwise,
you will need to implement a full symbolic algebra system (like Maple or
Mathematica) and use combining/simplifying/factoring/equation solving logic
to handle the most general cases.

You could limit yourself to dealing with square roots and perhaps other
irrationals. Then you could look into "continued fraction arithmetic". Do
a Google search on that for some ideas.

But take warning by looking athttp://www.math.utexas.edu/pipermail/maxima/2007/005351.html












- Show quoted text -

That's what I was afraid of. Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top