1. Why is BIGInteger in JAVA not responding for higher powers? stackoverflow.comWhen I try to find the value of BigInteger data type for 2 to power 23,000, I am not able to see the value. Upto 2 to power 22000, I could ... |
2. Why can Haskell handle very large numbers easily? stackoverflow.com
|
3. Java: How to use BigInteger? stackoverflow.comI have this piece of code, which is not working:
|
4. Java workaround for BigInteger stackoverflow.comI was working on a scenario wherein i had to implement BODMAS in Java and the operands could have as many as 1000 digits. So i chose to implement it in ... |
5. What complexity are operations on Java 7's BigInteger? stackoverflow.comWhat complexity are the methods |
6. What data-structure should I use to create my own "BigInteger" class? stackoverflow.comAs an optional assignment, I'm thinking about writing my own implementation of the BigInteger class, where I will provide my own methods for addition, subtraction, multiplication, etc. This will be ... |
7. Switch to BigInteger if necessary stackoverflow.comI am reading a text file which contains numbers in the range [1, 10^100]. I am then performing a sequence of arithmetic operations on each number. I would like to use ... |
8. BigInteger or not BigInteger? stackoverflow.comIn Java, most of the primitive types are signed (one bit is used to represent the +/-), and therefore when I am exceed the limits of this type, I can get ... |
9. biginteger calculation problem stackoverflow.comI am using the following code but the parameters are not passed to the methods.
In this g1,l are long values.
The method is
|
10. java: how for loop work in the case of BigInteger stackoverflow.comI want to take Input from the user as Big-Integer and manipulate it into a For loop
But it won't work
can any body help me.
... |
11. Get the integral part of a BigFraction, as a BigInteger stackoverflow.comWhat is an easy way to get the integral part of a |
12. Optimise arithmetic operations on very large numbers stackoverflow.comI want to compute the function H(n) where
C is an array of n elements
But it is taking too much time...any better way of doing this..Please help
|
13. Creating a BigInteger Method stackoverflow.comIs there any way to create a BigInteger Method? I want to have a method of return type BigInteger. |
14. Using BigInteger Multiply operator stackoverflow.comI was wondering if there was a way to multiply |
15. Java, comparing BigInteger values stackoverflow.com
I need to ... |
16. java using BigInteger and While stackoverflow.comI have a problem
|
17. Exponentiation of a Java BigInteger with a value lower than 1 stackoverflow.comPossible Duplicate:I have a BigInteger A that I need to exponentiate with 1/b (b is ... |
18. how can I use biginteger in java stackoverflow.comi have this code and i want to change it to BigInteger
|
19. BigInteger Homework Help Needed stackoverflow.comI have been told I have to write a BigInteger class, I know there is one, but I have to write my own. I am to take either ints or a ... |
20. How does BigInteger store its data? stackoverflow.comI've been searching around for quite a while, and I've found almost nothing on how BigInteger actually holds its numbers. Are they an array of chars? Something else? And how is ... |
21. OutOfMemoryError on BigInteger stackoverflow.comI'm writing a polish notation calculator for BigIntegers (just *, ^ and !) and I'm getting an |
22. Implementing BigInteger's multiply...from scratch (and making sure it's O(n^2)) stackoverflow.comAs homework, I'm implementing Karatsuba's algorithm and benchmarking it against a primary-school-style O(n^2) multiplication algorithm on large integers. I guessed my only choice here was to bring the numbers to their ... |
23. How do i compare values of BigInteger to be used as a condition in a loop? stackoverflow.comI am trying to compare if the value of one BigInteger(base) is > the value of another BigInteger(prime) and if the value of 'a' is not equal to one. If ... |
24. NumberFormatException, BigInteger in java stackoverflow.comGetting following run-time error
|
25. Modulus not positive :BigInteger stackoverflow.comerror ---Modulus not positive BigInteger is taking vaule 0, or -ve, but i can't figure out where
|
26. Java_stackoverflowerror using BigInteger. stackoverflow.comThe following code results in a
|
27. Logarithm for BigInteger stackoverflow.comI have a |
28. Why is this happening in BigInteger stackoverflow.com
The output ... |
29. Problem with a number when storing in BigInteger and retrieving back stackoverflow.com
The output for the above code is:
|
30. Efficient BigInteger in Java stackoverflow.comWe have a set of locations within our product where BigInteger is required as the numbers can be fairly long. However, in over 90% of the cases, they are actually not ... |
31. how to input a BigInteger type in java stackoverflow.comwhen I tried to get an input of type Integer, what I only needed to do was the code below.
but when it comes to ... |
32. Why to avoid biginteger instantiation in Java stackoverflow.comThere is a PMD rule saying one should avoid to instantiate BigInteger or BigDecimal if there is a predefined constant.
Would there be any other advantage ... |
33. Java BigInteger Memory Optimization stackoverflow.comI'm trying to find LCM of given N numbers. But this code of mine takes more than 32Mb memory. What kind of optimization can I perform here?
|
34. Java How to invert a BigInteger? stackoverflow.comI need to invert a |
35. BigInteger exponents - how? coderanch.comOK, well, here is some code: import java.math.BigInteger; public class BigIntegerX { public BigInteger pow(BigInteger mantissa, BigInteger exponent) { final BigInteger MAX_LONG = new BigInteger(Long.toString(Long.MAX_VALUE)); final BigInteger factor = new BigInteger(mantissa.toString()); BigInteger remainder = exponent.mod(MAX_LONG); for (int i = 0; i < remainder.longValue() - 1; i++) { mantissa = mantissa.multiply(factor); } exponent = exponent.subtract(remainder); while (exponent.compareTo(BigInteger.ZERO) > 0) { for (int ... |
36. BigInteger back to text coderanch.comHi all, I am doing some Encryption type studies and have encrypted then decrypted ok( I think). I am struggling to get what was initially a simple text file converted to byte then BigInteger, back to the same presentable text. Can someone advise a process from BigInteger to a file save state. What I have tried with all sorts of variations ... |
37. Advantage of BigInteger Class coderanch.comThe problem is that the methods in the Math class work with ints and doubles. Those types can hold only finite numbers. The BigInteger and BigDecimal classes can hold arbitrarily large numbers. Another advantage of BigDecimal is that because of the problem of representing decimal numbers in binary, doubles are not appropriate for financial programs. But BigDecimal gives you accuracy. |
38. BigInteger in java coderanch.com |
39. BigInteger Class Worked on my Hex-String coderanch.comHi guys, Thanks and sorry for posting one question twice because i want to change my question but it was posted so i didnot knew how i can edit. Well BigInteger worked my program though every Hex-String results as n Integer where i thought it might result as a Hex-String. Any Way i am happy that its working.... Regards. |
40. BigInteger Power/Exponent BigInteger coderanch.comisnt the code I wrote in the post after Campbell's suggestion does exactly what his code does but in java? because the code I wrote doesnt seem to work, in Campbell's code, he never decreases the exponent... or I cant understand the code correctly how to write a java code that does the same thing as Campbell's code does? can anyone ... |
41. a little BigInteger problem coderanch.com |
42. Biginteger coderanch.com |
43. BigInteger coderanch.com |
44. BigInteger and multiplying coderanch.com |
45. BigInteger coderanch.com |
46. Need help with BigInteger coderanch.com |
47. Why no toBinaryString(BigInteger b) coderanch.comHi Varun, There is no toBinaryString() method, but there is a bitLength() method that tells you how many bits there are, and a testBit(int) method that tells you the state of each bit. So create a StringBuilder, store bitLength() in a variable "n", then in a for loop check each bit from n-1 to 0 and append the appropriate "1" or ... |
48. Initial value for BigInteger from another BigInteger coderanch.comYou are right, I missed the "immutable". Suppose x is an array of BigInteger. I want to compute x[i] = (x[j] + x[k]) *x[n] for various values of j, k, and n that are less than i and functions of i. The value of the reference at x[i] will change several times as I compute the value. The garbage collector will ... |
49. bigInteger to float or double coderanch.comAs soon as you turn it into a float you've lost quite a bit of accuracy already. That's because float only has 32 bits in which to store both the integer and the decimal part. double is better but still limited. The only way to maintain your accuracy is to keep using BigInteger. |
50. BigInteger coderanch.com |
51. BigInteger Operations coderanch.com |
52. The bigInteger class go4expert.com |
53. BigInteger java-forums.orgThose javadocs can be difficult to understand sometimes though. Basically, the BigInteger class was created through java to help mathematicians or anybody really, wanting to make calculations with numbers that use large amounts of digits in those numbers. Because when you initialise a variable such as a normal int or a byte or a double or float or a long etc, ... |
54. My own BigInteger class. Need help. java-forums.org |
55. very new... Biginteger problems java-forums.orgHello I am very new to Java (this is my first java programming) and am puzzeling how to work with Big integers and i am not able to work it out My problems reduced to simple statements are the following Declaration I need to declare a new BigInteger with a value of 1 Multiply a named biginteger by 3 Add one ... |
56. BigInteger value of java-forums.orgimport java.math.*; import java.util.*; public class BigInteger { public static void main (String []args) { Scanner in = new Scanner(System.in); System.out.println("How many numbers do you need to draw ?"); int k = in.nextInt(); System.out.print("What is the highest number you can draw ?"); int n = in.nextInt(); BigInteger lotteryodds = BigInteger.valueOf(1); for(int i = 1; i <=k; i++) lotteryodds = lotteryodds .multiply(BigInteger.valueOf(n ... |
57. BigInteger Rational (CS106A-Stanford university) java-forums.orgBigInteger Rational (CS106A-Stanford university) Hi Folks, This is the exercise iam trying to solve from the book "Art and science of Java": The implementation of the Rational class given in this chapter is not particularly useful in practice because it doesnt allow the numerator and denominator to exceed the size of an integer, even though larger values tend to ... |
58. BigInteger class in the art & science of java java-forums.orgHi, I' m new to java. when I do the exercise in the book "the art and science of java", I come across a problem about BigInteger class. Here is question: The implementation of the Rational class given in this chapter is not particularly useful in practice because it doesnt allow the numerator and denominator to exceed the size of an ... |
59. Does any one know how to write this e^sqrt(lognloglog(n)) ,where n is biginteger java-forums.orgIf numerical accuracy is desired (I'm assuming it is), I'd write a log function using the BigInteger and BigDecimal classes directly. You might consider talking to a mathematician. This function appears to me to be monotonic, and so a gradient descent (Newton-Raphson) approach may work and provide a solution much faster than direct computation. |
60. BigInteger java-forums.orgI have some code to add *very* large numbers. Java Code: import java.math.*; public class charles { public static void main(String[] args) { BigInteger a1 = new BigInteger("46376937677490009712648124896970078050417018260538"); BigInteger a2 = new BigInteger("74324986199524741059474233309513058123726617309629"); BigInteger a3 = new BigInteger("91942213363574161572522430563301811072406154908250"); BigInteger a4 = new BigInteger("23067588207539346171171980310421047513778063246676"); BigInteger a5 = new BigInteger("89261670696623633820136378418383684178734361726757"); BigInteger a6 = new BigInteger("28112879812849979408065481931592621691275889832738"); BigInteger a7 = new BigInteger("44274228917432520321923589422876796487670272189318"); BigInteger a8 = ... |
61. Biginteger help forums.oracle.com |
62. BigInteger forums.oracle.com |
63. BigInteger forums.oracle.com |
64. BigInteger Problem forums.oracle.comYou need to be more specific about what your problem is. Saying your gui doesn't work doesn't tell us anything useful. You shouldn't give your classes the same name as already existing classes, it just leads to confusion. There's already an Integer class in the api. If you do give them the same name, at least put it in a package ... |
65. BigInteger modPow forums.oracle.com |
66. BigInteger.probablePrime() doesn't output the correct bitlength? forums.oracle.comFrom the API documentation for Random: "If two instances of Random are created with the same seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers." And: "Two Random objects created within the same millisecond will have the same sequence of random numbers." So you might consider using only one ... |
67. What is BigInteger? forums.oracle.comI tried reading the API and googling but couldn't really find anything that tell me what it is or I'm just not understanding it. So what's the difference between an int and a BigInteger? How many bits is a BigInteger? The closest thing I could find was "a BigInteger allows you to store an arbitrary big non-decimal number" . Can anyone ... |
68. BigInteger multiply limit forums.oracle.comYoungWinston wrote: I also noticed that your number is 4,093 digits long, which would suggest that the answer should be 4,097, so I wonder if some sort of 4K limit is being breached. But whether it's a BigInteger bug, or simply a problem with banging out that many characters to System.out in one go, I don't know. I did a little ... |
69. how i can find log2 of BigInteger ? forums.oracle.com |
70. Problem with BigInteger conversions forums.oracle.comHello, I have a question about the BigInteger class: How can I convert a string of decimal encoded bytes such as "12345678901234567890" to a BigInteger, then back to a string again? I want to translate it back to a string using toByteArray ( Yes I know it uses the two's compliment, I'm just not sure how to get it into a ... |
71. DataType BigInteger forums.oracle.com |
72. Problem with BigInteger and short type forums.oracle.comI have a block of data in a byte array, and i must append at the beginning of this array those two bytes that represent the short value (this values is the amount of bytes in the block of data that is constant) i simply always have to have this zero value at the beginning, becouse the block of data must ... |
73. BigInteger padding forums.oracle.comso say I have: BigInteger big = new BigInteger("110001", 2); I want this to be "0110001", so I want to pad this with another 0 in front?? How do I do this? I tried shifting it to the right and it becomes 11000 instead of adding 0 in front of it... how do I do this?? may seem like a stupid ... |
74. BigInteger class question forums.oracle.com |
75. BigInteger heap space error in method add() forums.oracle.comException in thread "main" java.lang.OutOfMemoryError: Java heap space at java.math.BigInteger.add(Unknown Source) at principal.crearCompuestosOpIguales(principal.java:190) at principal.main(principal.java:124) First, I thought that the problem was the amount of memory the JVM, but after bend, the problem persists. I have seen some errors in methods of the class BigInteger, in my case it gives in the method add, but I do not know how to ... |
76. BigInteger Class forums.oracle.com |
77. Extended Euclid BigInteger version forums.oracle.comIt would also help to learn how to debug, either stepping thru your code to see where it's doing something you didn't expect, or having it simply print intermediate values to cue you in to that. In this case you would have been able to see that the (q.compareTo(BigInteger.ZERO) == 1) wasn't doing what you thought it would do, because you ... |
78. BigInteger problem ? Number of possible passwords with a given set forums.oracle.comThe code below gets the number of possible passwords created with a set of setLen and a starting password length of startNr and endNr as maximum length. Example: all number of passwords with letter from a to z and length from 1 to 8 will translate as passwdNr(27,1,8). This is computationally expensive: 2263 ms for a (70,1,9). Now the problem is ... |
79. Problem with BigInteger class forums.oracle.com |
80. Ln of BigInteger forums.oracle.com |
81. Does BigInteger have a MaxValue limit? forums.oracle.comI was just thinking , it takes at least 4 bits to represent a decimal digit (0 to 9) So that means 1 byte = 8 bits can hold 2 decimal digits. 8 GB = 8 x 1024 MB = 8 x 1024 x 1024 B = 8388608 B = 16777216 Digits What size memory does it take to hold 16777216 ... |
82. Collision in BigInteger... forums.oracle.com |
83. BigInteger Reporting incorrect values ??? forums.oracle.comif there are 24 characters in String then conversion should be 12 byte. This suggests that you have in mind a rule like "2 characters per byte". But you first turned the characters into a BigInteger. And BigIntegers (like other sorts of number) contains one extra piece of information that we are apt to forget sometimes when we write the number ... |
84. how to use biginteger forums.oracle.com |
85. Biginteger problem forums.oracle.comthis is my current code but it only works up to 20 digits because of the limitation on long for(int test = 0; test <20; test++){ if (temp.substring(i, topN).compareToIgnoreCase("0") == 0) myInt = BigInteger.valueOf(y + y*10+0); else if (temp.substring(i, topN).compareToIgnoreCase("1") == 0) y = y * 10 + 1; else if (temp.substring(i, topN).compareToIgnoreCase("2") == 0) y = y * 10 + ... |
86. Is there a class for BigInteger in c++ forums.oracle.com |
87. BigInteger question forums.oracle.com798089 wrote: I rarely comment on here because the last time I did, a poster was nasty to me, That would be this thread, which included this comment from me: I believe he's getting frustrated because you keep asking the same thing and keep getting told the same answer. If you don't understand the answer, then it's on you to expand ... |
88. BigInteger comparision is failing in 1.5 forums.oracle.com |