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
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