JK.Lists.questions
Usenet Archive
- Joined
- Jul 28, 2008
- Messages
- 2
- Reaction score
- 0
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Thank You.
Thank You.
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Thank You.
Stop trolling fool.
The question is clear. Why is logarithm missing from the BigInteger API? By logarithm i mean a function analogous to the one in the Math API. I should be able to pick and choose the base, but if you insist on one, 10 is fine.
Thanks in advance.
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Thank You.
There are no exponential or logarithmic methods in Math that either operate on integer parameters or return integer values. Furthermore, the only methods that either operate on integral arguments or return integral values are abs, getExponent, max, min and round.The question is clear. Why is logarithm missing from the BigInteger API? By logarithm i mean a function analogous to the one in the Math API. I should be able to pick and choose the base, but if you insist on one, 10 is fine.
Stop trolling fool.
The question is clear. Why is logarithm missing from the BigInteger API? By logarithm i mean a function analogous to the one in the Math API. I should be able to pick and choose the base, but if you insist on one, 10 is fine.
Thanks in advance.
Stop trolling fool.
The question is clear. Why is logarithm missing from the BigInteger API? By logarithm i mean a function analogous to the one in the Math API. I should be able to pick and choose the base, but if you insist on one, 10 is fine.
Thanks in advance.
The question is clear. Why is logarithm missing from the BigInteger API?
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
My guess is that its missing because BigInteger class was made for Cryptography [sic] ... all methods for this are there.
And you don't need to calculate the log in crytography.
Perhaps one thing you could do is find out the length of a number, which is a sort of integer log.
Lew said:Christian said:My guess is that its missing because BigInteger class was made for Cryptography [sic] ... all methods for this are there.
BigInteger was not made specifically and solely for use in cryptography algorithms, but for the class of algorithms that need arbitrary-precision integers, of which cryptography presents but one application.
Not all the methods needed to do cryptography are present in BigInteger, therefore
And you don't need to calculate the log in crytography.
does not provide a reason for the absence of logarithm calculations there.
What does provide a reason is what Patricia, myself and others have pointed out. The question is ill-specified and the utility negligible, if not negative, to provide such functionality.
Mark said:I got to agree with Lew here, I don't see what the problem is.
BigInteger two = new BigInteger( "2" );
double log = Math.log( two.doubleValue );
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Does anyone know a solution for this problem or of any arbitrary precision arithmetic libraries that have this functionality?
Arne said:I don't think that method will work for the full range of BigInteger !
could you if quoting parts of Lew's Posts instead Quote the whole post .... as a lot of them are missing for me too/ can't see lots of Lew's posts at all.John said:Lew said:Christian said:My guess is that its missing because BigInteger class was made for Cryptography [sic] ... all methods for this are there.
BigInteger was not made specifically and solely for use in cryptography algorithms, but for the class of algorithms that need arbitrary-precision integers, of which cryptography presents but one application.
Not all the methods needed to do cryptography are present in BigInteger, therefore
And you don't need to calculate the log in crytography.
does not provide a reason for the absence of logarithm calculations there.
What does provide a reason is what Patricia, myself and others have pointed out. The question is ill-specified and the utility negligible, if not negative, to provide such functionality.
Except for the trivial case of someBigInteger.toString.length, of course.
Mark said:Really? I assumed that BigInteger would run out of virtual memory before double ran out of exponent range. Maybe I'm wrong.
If you mean that the double "log" won't have enough mantissa digits, well duh. Who expects full precision from a number that has an
*infinite* number of digits? Besides the OP, I mean. Let's say we limit "who" to the set of sane people....
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.