# Long Division with Remainder or Decimals

• Jul 1st 2008, 08:54 PM
mathceleb
Long Division with Remainder or Decimals
I've put together a long division calculator that shows the math for remainders or decimal places. I've done some testing on it, but want to work out any kinks that you may find or add enhancements if requested.

This lesson is located on the basic math page, and searchable by division, remainder, long, and decimal. I've tried to design it similar to the mathisfun.com examples in some of the threads here. Enjoy.

Long Division with Remainders or Decimals
• Jul 2nd 2008, 03:34 AM
topsquark
There's a bug. Do first, 4 / 6 (long division) then 14 / 6. The first problem is not entirely erased.

-Dan
• Jul 2nd 2008, 05:44 AM
mathceleb
Quote:

Originally Posted by topsquark
There's a bug. Do first, 4 / 6 (long division) then 14 / 6. The first problem is not entirely erased.

-Dan

topsquark,

I made one change last night, not sure if it is related to this. I ran it this morning immediately one after another and it looks fine.

Did you scroll down to see the math? Let me know if it still does not work, I'll clear out my arrays.

I did 4/6 and then 14/6 using both methods, one after the other and it looks ok. I've seen something like you decribed before with javascript with rapid fire pushing of buttons. Also, if you scroll down to the bottom of the math bar, and then run another calc, the scroll bar stays at the bottom. Let me know if it looks ok on your end. Refresh your browser first please.
• Jul 2nd 2008, 06:03 AM
mathceleb
Topsquark,

My apologies. I read up on what happened, just because it worked for me does not mean it will work for you. I've emptied my results upon each calculation now, so this should fix it on your end. Sorry about the confusion. I just made the change 2 minutes ago.
• Jul 2nd 2008, 02:14 PM
Reckoner
Quote:

Originally Posted by mathceleb
I've put together a long division calculator that shows the math for remainders or decimal places. I've done some testing on it, but want to work out any kinks that you may find or add enhancements if requested.

This lesson is located on the basic math page, and searchable by division, remainder, long, and decimal. I've tried to design it similar to the mathisfun.com examples in some of the threads here. Enjoy.

Long Division with Remainders or Decimals

Looking good! Two things though:
• When writing escape characters in HTML, the proper format is "&---;". Some browsers allow you to omit the semicolon, but this is not standard. In my browser, your non-breaking spaces are not parsed correctly, and I see "&nbsp" on the page by the buttons. In fact, the W3C validator finds a number of other problems with the page's compliance.
• You might want to improve the decimal fraction division method to detect repeating decimals rather than looping blindly until the digit extraction limit is reached. For example, when you calculate $\displaystyle \frac13$, you could end it after the second iteration or so. This could be a bit tricky though, especially with things like $\displaystyle \frac{16}{99}$ or $\displaystyle \frac{448451}{3333333}$ where the repeated sequence is more than one digit long.
Still, good work.
• Jul 3rd 2008, 08:06 AM
mathceleb
Reckoner,

Thanks for the review! I've performed some of the changes on the validation error report you supplied. In addition, for answers with decimals, I've limited the loops now to 5.

Please review after refreshing your browser and see if the nbsp's are gone as well as the new decimal iteration maximum.
• Aug 9th 2008, 02:55 PM
mathceleb
One additional enhancement has been made to this lesson -->: Long Division with Remainders or Decimals

A random problem generator button has now been added, similar to what was done on the quadratic lesson.
• Sep 8th 2008, 01:34 PM
mathceleb
One additional requested enhancement has just been added:

When running the remainder calculation, the remainder answer portion will also be expressed as the remainder divided by the denominator in addition to the original answer of quotient and remainder.

In addition, this will be reduced down as far as possible using a GCF.

The math work portion of the above will be located after the program loops through the iterations of division near the bottom of the chalkboard.

Thank you for your suggestions. (Rock)
• Oct 9th 2008, 11:12 AM
mathceleb
One significant gigantic update to this lesson, and hopefully, the final one:

This lesson now can take any 2 positive numbers, and add/subtract/multiply as well as the original long division operations with remainder and decimals.

I've rewritten the entire lesson plus the division in another language so the alignments and spacing would be more lined up and readable.

For the addition/subtraction/multiplication piece, I eliminated my old lessons in entry boxes that could only handle certain digits and did not have full math work and replaced it with this. This will show the borrowing/carrying for the 3 operations.

As a final add in, for multiplication, when all the round of multiplication complete, the program will then add each column step by step.

As always, let me know if you have questions or enhancements or corrections.
• Oct 20th 2010, 01:47 PM
mathceleb
This lesson now calculates the partial sums of two numbers as well.
• Oct 30th 2010, 06:46 PM
mathceleb
Update:

This lesson now calculates the partial quotient. This method is used instead of long division at times to do division.

Be advised that the method of partial quotients can be done many ways, but the general majority consensus of teachers I spoke with who asked me to add this feature said that factors of 10, 5, 2, and 1 are targeted in classrooms, therefore, this is how I built this lesson.

Color coding is included.
• Mar 9th 2011, 08:05 PM
mathceleb
Enhancement Update: I have added another button on this lesson for "short division".