There's a bug. Do first, 4 / 6 (long division) then 14 / 6. The first problem is not entirely erased.
-Dan
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
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.
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.
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 " " on the page by the buttons. In fact, the W3C validator finds a number of other problems with the page's compliance.
Still, good work.
- 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 , you could end it after the second iteration or so. This could be a bit tricky though, especially with things like or where the repeated sequence is more than one digit long.
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.
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.
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.
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.
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.