Re: Confused in C for float and double vs in Java float and double? Programming Software Development by coil Doubles and floats are both used for decimal numbers, but doubles have greater accuracy. Link: [url]http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[/url] Re: for loop - ridiculous exception Programming Software Development by Ancient Dragon doubles can not be represented exactly in memory. The value of …, if anything, you can do about it except convert the doubles to integers and use the integers in the loop. Re: Convert.ToDouble, Math.sqrt problems Programming Software Development by ddanbe Doubles are not "exact" numbers. You are confronted with rounding errors. Try this: It will not give you what you expected: [CODE=c#]double d = 0.0; for (int i = 0; i < 100000; i++) { d = d + 1000000.23; } MessageBox.Show(d.ToString());[/CODE] Doubles Programming Software Development by jimbob8472 hi i know this is a newb question, but how do i get doubles to display the end zeros after the decimal point for example i want to display 1.20 but i'm getting 1.2 cheers Re: Doubles and Floats Programming Software Development by Nick Evan … double is more precise then float. This also means that doubles have less problems with rounding errors. My personal rule of… be aware of it's restrictions. In other cases use doubles. Here's something to read on [URL="http://docs… ctypes - pointer to array of doubles? Programming Software Development by trayres … argument is a pointer to an array of doubles (the array is four doubles long - so the argument to the function is… function takes this pointer, changes the values of the 4 doubles that are located by it, and exits. I need to… somehow get to those 4 doubles, but all I know is the double pointer that I… Working with doubles, having some troubles Programming Software Development by Ripture … 20. It does not seem to like comparing the two doubles together, at least not in the way that I formed… here so that I would be comparing ints and not doubles. That seemed to do the trick and the output seems… to fix this or is it just a property of doubles that you have to work with? Sorry for the wall… filter datagrid with combobox and prevent doubles Programming Software Development by cardin94 …combobox either a filled combobox that displays all the doubles. or a message "System.Data.DataViewManagerListItemTypeDescriptor"… use for selecting the firms to lose the doubles. I can load the datagrid and load the….Data.DataViewManagerListItemTypeDescriptor or is empty or shows the doubles. Is there anyone that can help me solve… Re: Working with doubles, having some troubles Programming Software Development by Ancient Dragon … common problem that is inherent in the way floats and doubles are represented in memory. There are many numbers that can… reading/writing doubles without passing through text? Programming Software Development by miturian … load the state of my system (a large number of doubles), the following behavior of the system will be slightly different… will be appreciated profoundly. If I have misunderstood something about doubles or binary, I would like to be corrected as well… Re: reading/writing doubles without passing through text? Programming Software Development by miturian …<double> v (b, e); cout << "doubles copied: " << v.size() << endl; for… read: 8 10 6.91384e-310 0 1.63042e-322 doubles copied: 0 [/CODE] I have tried changing temp, and it… Re: I need to make a game in java called 'doubles'? Programming Software Development by MatthewYeend … 4 3 2 1 3 Your score = 0 Or: Starting Doubles ... die1 die2 ***** ***** 3 3 6 1 5 2 Your… score = 1 Or: Starting Doubles ... die1 die2 ***** ***** 3 3 6 6 2 2 Your… Re: Why is this printing doubles? Programming Software Development by tyczj 20, 08, 20, 08, 05, <-- it prints that? well they are not doubles, doubles are like 20.035515563.... thoes that it prints are all ints Re: reading/writing doubles without passing through text? Programming Software Development by chrjs … might have some '.0's after them cause they are doubles), not those numbers binary representations. All your second example does… Re: reading/writing doubles without passing through text? Programming Software Development by miturian … it, that would mean I would still be casting my doubles into chars, and therefore not avoiding the binary/text translation… outputs an int when i want doubles Programming Software Development by roodope …] Why am i getting ints as the output I want doubles??? :evil: Re: outputs an int when i want doubles Programming Software Development by Narue …;Why am i getting ints as the output I want doubles??? I have no idea, but I'll admit that I… Why is this printing doubles? Programming Software Development by tat2dlady Can anyone tell me why this is printing doubles out to the output file? [CODE] IndexFile.seekp(20, ios::… mod "%" with doubles and constants Programming Software Development by kllera … the caluclations but the operation can't be done with doubles(variable and constant). right now it's found by math… Re: mod "%" with doubles and constants Programming Software Development by Radical Edward > This value I thought to use % of the caluclations but the operation can't be done with doubles(variable and constant). You can use the [URL="http://www.hmug.org/man/3/fmod.php"]fmod()[/URL] function to find the remainder of division for floating values. Sorting an array of doubles? Programming Software Development by java_girl Hi. The objective is to sort an array of doubles. My effort is listed below: [CODE=C] #include <stdio.… Re: Sorting an array of doubles? Programming Software Development by ssharish2005 … of array hold an starting address of an array of doubles. If you are trying to sort that sort of an… HELP array of doubles !!!! Programming Software Development by Spanki … need to make a program to create an array of doubles. Array of sales for 10 shops in a center .Load… long doubles Programming Software Development by cam875 … with exactly that. Also when I do calculations with long doubles sometimes I get this weird code that gets outputted on… Problem with doubles and floats, apparently Programming Software Development by Kuroshi … I do not know why there is a problem using doubles. I would like to know if there is a special… Re: Problem with doubles and floats, apparently Programming Software Development by WaltP Since doubles are rarely exact, probably your loop counter is wrong. For example when you think [I]i=4[/I] it's probably [I]i=3.9999902[/I] or something like that. looping through string to get doubles Programming Software Development by correaj … create a loop that would extract the first line of doubles in a file and insert them into this bag/container… rounding doubles Programming Software Development by fozzywozzy Hi, What's the best way to round doubles as in currency? I also have this error that says: internal error, cannot instantiate paycheck(java.lang.string, double, double) at paycheck to (). If you need to see the codes, I can post them. Any help at all would be greatly appreciated! Thanks! Reading Doubles out of a file Programming Software Development by coffeeMan21 I have a text file that contains 3 columns all doubles. I need to get only the first two columns and store each one seperate. ex. 45.909090 76.4839282 89.73739 i just need 45.909090 and 76.4839282 then skip to do it until i reach the end of the file. Any Ideas?? Thanks How to find the exponential value of two doubles? Programming Software Development by chudapati09 Edit: Never mind I figured it out. I used Math.pow(base, exponent) to figure it out I'm creating a calculator and I can figure out how to the power of two doubles. This is what I have: [CODE] public Power(Double base, Double exponent) { result = base ^ exponent; //result is a double } [/CODE]