Im facing a scenario where in ill have to compute some huge math expressions. The expressions in themselves are simple, ie have just the conventional BODMAS fundamental but the numbers that ... |
I'm trying to get the weighted average of a few numbers. Basically I have:
Price - 134.42
Quantity - 15236545
There can be as few as one or two or as ... |
I was just about to include the HtmlUnit library in a project. I unpacked the zip-file and realised that it had no less than 12 dependencies.
I've always ... |
I have two connected vectors of arrays of numbers. What is the fastest way to write/read them?
Should I use default (de)serialization or some other technique? XML is of course too unefficient.
... |
We think there are potentially a number of technologies that might work for us - Java3D, Google Sketchup, JavaFX or gaming framework, and probably many we're not familiar with.
We're getting ready ... |
Hey , i hope i get help with this.
im a coder of a rsps (runescape private server)
and in this game you could like have items and weapons
and the max anmount of ... |
suppose my .txt file is:
data
1.0 3.1 2.1 3.4
2.4 2.0 4.6 ...
|
|
I'm in the middle of creating a game-simulator for a project. The game consist of two armies fighting each other. Each army consists of multiple soldiers. Soldiers are ... |
I have written the following string comparison operation for a feature in my app.
But I hate the way this looks and how unwieldy it is.
String foo = "abc";
if(!foo.startsWith("ba") &&
...
|
To date I use the following implementation of the builder pattern (as opposed to the implementation described here):
public class Widget {
public static class ...
|
I have this problem:
A positive integer is called a palindrome if its representation in the decimal system is the same when read from left to right and from right to left. ... |
The problem is that you are constructing your BigDecimal from a "double". But the numbers you are trying to use cannot be perfectly represented by a double, so are wrong before ever becomeing a BigDecimal. To confirm this, print out the values of your BigDecimals, before the multiplication. Instead, you should avoid floating-point (e.g. "double") altogether and construct your BigDecimal from ... |
Hello I need to work with very large numbers (e.g. 2 ^ 8192 , 2 ^ (8192*8192)) and so on I am using BigInteger but overall computing becomes very slow when i go for 2 ^ (500 * 8192) Can someone sugggest me someway to make this faster or Is there any way to utilize CPU power of other machine (besides ... |
import java.text.DecimalFormat; public class FPAdder { public static void main(String[] args) { int numArgs = args.length; //this program requires at least two arguments on the command line if (numArgs < 2) { System.out.println("This program requires two command-line arguments."); } else { double sum = 0.0; for (int i = 0; i < numArgs; i++) { sum += Double.valueOf(args[i]).doubleValue(); } //format the ... |
I don't know much about this beyond a little bit of acedemic interest I am pursuing. So my comments are probably not worth a whole lot. With that disclaimer here is my 2 cents: First you need to pick an encryption scheme. There are many different ways to encrypte data. All of these have advantages and disadvantages, so you will need ... |
Hi As i wrote in my first post each numbers in the expression could be large as large as being represented by string of 1000 digits thats why i am not able to use BIGINTEGER of java. for example if i have an expression like ((10000000000000000000000001231234448563465435434723854278423 / 1111111111234623874627)*1111111111234623874627777778888312674534) then how i will manipulate it. in which data type i can store ... |
Hello all! What is the best way to specify the exception codes (consider more than 1000) ? For example, SQLExecption has a variety of exceptional situations like, (not exactly correct syntax. consider these are some examples) connection Failed, database doesn't exist, table could not be created, invalid datatype varcharr, No operation can be done after connection closed .......... etc., Like this, ... |
|
I want to do an analysis (once) using a java program on a very large amount of digits (1000). My question is: how do I hard code it or input it in my program? I tried hard coding it, but it won't except literals that exceed the int limit. edit: So I want those 1000 digits to go into a 1000 ... |
For example, i used to code a program where it tells if its odd or even,. using modulo 2 it seems all ok, but when i enter 111111111111111111111 or 99999999999999999999, my program says that both are even! a big question for me? and i stil dont know how to prevent it. Please help. Thanks in advance! |
I am a student with a question about how Java handles very large numbers. Regarding this from our teacher: "...the program produces values that are larger than Java can represent and the obvious way to test their size does not work. That means that a test that uses >= rather than < won?t work properly, and you will have to devise ... |
Hi all, Can anyone please help me, i need to write a class that will be able to handle the print of large number of documents to an printer (about 2000 2 page documents at a time), at the moment im sending the data to the printer, using a socket connection, this is fine for now as we have small number ... |
|
Using Opera 9.27 (Linux) I have no problem entering text into an applet with 49,000 textfields. Using IE 6.0 (Windows) I notice CPU usage shooting up as text is entered (only to about 50% and only until the text has "caught up"), and the UI is a little sluggish. The solution, I guess, is not to use that browser or put ... |
|
Hello, I'm making an app which requires doing math on some arbitrary large numbers. Since math is usually my achilles heal, I have no idea how to do this. Specifically, i have a byte[] number and I'm trying to implement these two functions: byte[] root(byte[] number,int radix) byte[] pow(byte[] base,int power) can someone give me a clue on how to do ... |
|
It depends on your requirements. "Large" is rather vague. You may find that long is sufficient. If not, then maybe double will do. Note, though that double also carries a fractional part, so, even though it has 64 bits like long does, and can cover a wider range of numbers, it can't represent every integer in that range exactly. If those ... |