|
I need some division algorithm which can handle big integers (128-bit). I've already asked how to do it via bit shifting operators. However, my current implementation seems to ask for a better approach
Basically, I store numbers as two long long unsigned...
Started by Etan on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
long of decimals (1/24 is for instance 0.041 ...) and can therefore interfere with the fourth term in your as four 32-bit numbers:
A....
You shouldn't be using long double for your "normal divisions" but integers there as well.
|
|
Hello everyone,
I recently came across a problem that sparked my curiosity. Try to solve this problem using long division w/ decimals instead of remainders, solving to 4 decimal places. After you have done that, use long division w/ remainder. Finally...
Started by asnyder171 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at mymathforum):
Finally type it in on your calculator and record except a calculator... .
After you have done that, use long division w/ remainder.
Solving to 4 decimal places.
Using long division w/ decimals instead of remainders,
.
|
|
I have two unsigned long longs X and Y, where X < Y, but both may be very large. I want to compute the first digit past the decimal point of X / Y. For example, if X is 11 and Y is 14, then 11 / 14 is .785…, so the result should be 7.
(X * 10) / Y ...
Answer Snippets (Read the full thread at stackoverflow):
Edit still compare two possibly overflowed ints as long as you know that the difference between the two namespace std; typedef....
division:
(long)((long)10*R/Y)
This should round down the numbers and drop any extra decimals.
|
Ask your Facebook Friends
|
Heres how DLD2 lines up for 2008/09...
Attachment:
dld2180808.JPG [ 55.52 KiB | Viewed 1744 times ]
For more comprehensive updates please visit the DLA website at http://www.drunkenleague.co.uk .
Game on
Started by The Ledge on
, 30 posts
by 10 people.
Answer Snippets (Read the full thread at fiso):
Ian Herbert* 57 2202
3 Martini on da rock Mr Martyn Long 57 2275
4 The Puddloflajs Mr Mark Telford showing as 105th on 54 (actually 54.2) but that might be =94th, depends on the decimals which CleverTV
17 Mr Martyn Long Martini on....
|
|
On Mon, 16 Mar 2009 22:40:26 -0400, "David" <dw85745NOT@earthlink.net
I'm erring because the whole number cumulative total is greater than
the long data type.
Any suggestions on how to handle in VB?
Started by David on
, 10 posts
by 6 people.
Answer Snippets (Read the full thread at omgili):
And if that all is not enough for you, you could create your
own huge type of "Learning"
How would you go about... .
On Tue, 17 Mar 2009 13:55:10 +0100, "Claus Centrino" <cc58@sofort-mail.de
A Long value has not to have no decimals.
|
|
I am considering writing two limited precision alternatives to BigDecimal, namely DecimalInt and DecimalLong. These would be capable of dealing with numbers within the real bounds of int and long with an arbitrary number of decimal places, creatable in...
Started by Software Monkey on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
For handling money, then this is usually done by holding integer (long if necessary) numbers of cents.
|
|
On 23 May 2009 18:28:51 GMT, david <david@somewherebutwhocares.net
On 22 May 2009 david read the alt.fiftyplus post of Chakolate, which
stated...
does it have to go to college to be able to do that? It took me quite a
while before I could do...
Started by david on
, 4 posts
by 2 people.
Answer Snippets (Read the full thread at omgili):
On 23 May 2009 20:27:07 GMT, david <david@somewherebutwhocares.net
On 23 May 2009 david read... .
--
Mick.
On Sat, 23 May 2009 19:51:02 +0100, Mick Fanner <mick.fanner@gmail.com
I took to that like a snail takes to non-logarithmic shells .
|
|
Hi- I am hoping for some input on my rising 6th grader. He completed half of 5th grade in public school but was in 6th grade math. But, he went from 4th to 6th grade math so I am starting to wonder what he missed!
We just started homeschooling 2 months...
Started by lamolina on
, 1 posts
by 1 people.
Answer Snippets (Read the full thread at welltrainedmind):
|
|
I receive an integer that represents a dollar amount in fractional denominations. I would like an algorithm that can add those numbers without parsing and converting them into doubles or decimals.
For example, I receive the integer 50155, which means ...
Started by Steve H. on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
50 and 15.5/32 becomes 50*320+155 = 16155 10.
And multiply the raw integer values all day long.
|
|
I am working on an assignment for school which involves binary numbers and representing large numbers in scientific notation, I am not so good at this so would appreciate some help.
this is the question:
How many bytes can be found in 1 petabyte? Please...
Started by orangeninja on
, 11 posts
by 3 people.
Answer Snippets (Read the full thread at mymathforum):
Pari/GP.
This problem does not require a calculator or long division, just moving units around.
That 20 petabytes are used by a search engine every day of the week, how long does it take this search.
|