An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
feat(math): add decimal multiplication chapter
yzrf85d77fc4fe7
diff --git a/site/index.html b/site/index.htmlindex 2d210d3..f9408c8 100644--- a/site/index.html+++ b/site/index.html@@ -23,8 +23,8 @@<a class="book-hotspot algebra-book" data-book="elementary-algebra" href="elementary-algebra/" aria-label="Open Elementary Algebra, 68 narrated chapters"><span class="book-caption"><strong>Elementary Algebra <span aria-hidden="true">↗</span></strong><small>68 narrated chapters</small></span></a>- <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 8 narrated chapters">- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>8 narrated chapters</small></span>+ <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 9 narrated chapters">+ <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>9 narrated chapters</small></span></a><span class="physics-pending">Physics · Coming soon</span></section>diff --git a/site/lib/bookshelf.js b/site/lib/bookshelf.jsindex a1ad4b1..9bc5871 100644--- a/site/lib/bookshelf.js+++ b/site/lib/bookshelf.js@@ -17,7 +17,7 @@const books = [{ id: 'elementary-algebra', key: 'progress', chapterBase: 'elementary-algebra/', chapters: 68 },{ id: 'math-notebook', key: 'animebook:progress:' + new URL('math-notebook/', location.href).pathname,- chapterBase: 'math-notebook/', chapters: 8 },+ chapterBase: 'math-notebook/', chapters: 9 },];for (const book of books) {const cover = document.querySelector(`[data-book="${book.id}"]`);diff --git a/site/math-notebook/ch08/index.html b/site/math-notebook/ch08/index.htmlindex a973f19..820eccf 100644--- a/site/math-notebook/ch08/index.html+++ b/site/math-notebook/ch08/index.html@@ -2,7 +2,7 @@<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Adding and Subtracting Decimals — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.screen .blanks .math{font-size:38px}.side .keys{font-size:20px}</style></head><body><script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>'use strict';-const CHAPTER={number:8,title:'Adding and Subtracting Decimals',minutes:11,language:'en'};+const CHAPTER={number:8,title:'Adding and Subtracting Decimals',minutes:11,language:'en', next: '../ch09/' };const dcText=(p,s,x,y,t=0,size=30,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};const dcMath=(p,s,x,y,t=0,size=48,col=COL.chalk,anchor='middle')=>{const e=M(p,[s],{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};const dcTitle=(p,s,sub='')=>{dcText(p,s,100,120,.1,43);if(sub)dcText(p,sub,100,170,.15,27,COL.dim);};diff --git a/site/math-notebook/ch09/audio/en/area.mp3 b/site/math-notebook/ch09/audio/en/area.mp3new file mode 100644index 0000000..23c36afBinary files /dev/null and b/site/math-notebook/ch09/audio/en/area.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/context.mp3 b/site/math-notebook/ch09/audio/en/context.mp3new file mode 100644index 0000000..37d6e3eBinary files /dev/null and b/site/math-notebook/ch09/audio/en/context.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/estimate.mp3 b/site/math-notebook/ch09/audio/en/estimate.mp3new file mode 100644index 0000000..235c66cBinary files /dev/null and b/site/math-notebook/ch09/audio/en/estimate.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/final1.mp3 b/site/math-notebook/ch09/audio/en/final1.mp3new file mode 100644index 0000000..9a8b6dbBinary files /dev/null and b/site/math-notebook/ch09/audio/en/final1.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/final2.mp3 b/site/math-notebook/ch09/audio/en/final2.mp3new file mode 100644index 0000000..952e521Binary files /dev/null and b/site/math-notebook/ch09/audio/en/final2.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/final3.mp3 b/site/math-notebook/ch09/audio/en/final3.mp3new file mode 100644index 0000000..13ea680Binary files /dev/null and b/site/math-notebook/ch09/audio/en/final3.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/finish.mp3 b/site/math-notebook/ch09/audio/en/finish.mp3new file mode 100644index 0000000..8f6c532Binary files /dev/null and b/site/math-notebook/ch09/audio/en/finish.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/fraction.mp3 b/site/math-notebook/ch09/audio/en/fraction.mp3new file mode 100644index 0000000..4714fcaBinary files /dev/null and b/site/math-notebook/ch09/audio/en/fraction.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/integer.mp3 b/site/math-notebook/ch09/audio/en/integer.mp3new file mode 100644index 0000000..b19ef36Binary files /dev/null and b/site/math-notebook/ch09/audio/en/integer.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/intro.mp3 b/site/math-notebook/ch09/audio/en/intro.mp3new file mode 100644index 0000000..2041d88Binary files /dev/null and b/site/math-notebook/ch09/audio/en/intro.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/point.mp3 b/site/math-notebook/ch09/audio/en/point.mp3new file mode 100644index 0000000..a586ab2Binary files /dev/null and b/site/math-notebook/ch09/audio/en/point.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/q1.mp3 b/site/math-notebook/ch09/audio/en/q1.mp3new file mode 100644index 0000000..be54054Binary files /dev/null and b/site/math-notebook/ch09/audio/en/q1.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/q2.mp3 b/site/math-notebook/ch09/audio/en/q2.mp3new file mode 100644index 0000000..a69fde4Binary files /dev/null and b/site/math-notebook/ch09/audio/en/q2.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/q3.mp3 b/site/math-notebook/ch09/audio/en/q3.mp3new file mode 100644index 0000000..176beb4Binary files /dev/null and b/site/math-notebook/ch09/audio/en/q3.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/scale.mp3 b/site/math-notebook/ch09/audio/en/scale.mp3new file mode 100644index 0000000..093bfe5Binary files /dev/null and b/site/math-notebook/ch09/audio/en/scale.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/small.mp3 b/site/math-notebook/ch09/audio/en/small.mp3new file mode 100644index 0000000..25da838Binary files /dev/null and b/site/math-notebook/ch09/audio/en/small.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/timings.js b/site/math-notebook/ch09/audio/en/timings.jsnew file mode 100644index 0000000..a01ae11--- /dev/null+++ b/site/math-notebook/ch09/audio/en/timings.js@@ -0,0 +1,730 @@+window.TIMINGS = {+ "intro": {+ "dur": 17.784,+ "marks": {+ "sub": 9.518+ },+ "cues": [+ [+ 0.104,+ "Chapter nine."+ ],+ [+ 1.198,+ "Multiplying decimals."+ ],+ [+ 2.93,+ "A decimal product is still multiplication, with the size of each place kept carefully in view."+ ],+ [+ 9.518,+ "We will let a rectangle explain the decimal point, then use that idea to handle big products, tiny products, and zeros."+ ]+ ]+ },+ "area": {+ "dur": 34.176,+ "marks": {+ "width": 5.521,+ "height": 8.997,+ "cells": 16.419,+ "answer": 28.633+ },+ "cues": [+ [+ 0.117,+ "Here is one unit square."+ ],+ [+ 2.253,+ "Its full width and height each measure one unit."+ ],+ [+ 5.521,+ "Take four tenths of its width."+ ],+ [+ 7.487,+ "That is the blue strip."+ ],+ [+ 8.997,+ "Now take three tenths of its height."+ ],+ [+ 11.497,+ "The coral strip crosses the blue one."+ ],+ [+ 14.232,+ "The product is their overlap."+ ],+ [+ 16.419,+ "Each little cell is one tenth wide and one tenth high, so its area is one hundredth of the unit square."+ ],+ [+ 24.154,+ "The overlap contains four times three, or twelve cells."+ ],+ [+ 28.633,+ "Four tenths times three tenths is twelve hundredths, or zero point one two."+ ]+ ]+ },+ "fraction": {+ "dur": 33.24,+ "marks": {+ "frac": 2.083,+ "denom": 13.646,+ "result": 22.852+ },+ "cues": [+ [+ 0.117,+ "The picture gives a reason for the rule."+ ],+ [+ 2.083,+ "Zero point four is four tenths, and zero point three is three tenths."+ ],+ [+ 7.656,+ "When we multiply fractions, we multiply the numerators and the denominators."+ ],+ [+ 13.646,+ "Four times three is twelve."+ ],+ [+ 15.938,+ "Ten times ten is one hundred."+ ],+ [+ 18.138,+ "Each factor was divided by ten, so the product must be divided by one hundred."+ ],+ [+ 22.852,+ "That creates two decimal places: twelve hundredths, zero point one two."+ ],+ [+ 28.424,+ "Multiplying two numbers smaller than one can make an even smaller number."+ ]+ ]+ },+ "q1": {+ "dur": 6.648,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Quick check."+ ],+ [+ 1.146,+ "Choose the shaded patch that represents zero point four times zero point three."+ ]+ ]+ },+ "scale": {+ "dur": 34.608,+ "marks": {+ "first": 2.943,+ "second": 7.63,+ "multiply": 10.729,+ "count": 19.453+ },+ "cues": [+ [+ 0.104,+ "The same reasoning works beyond tenths."+ ],+ [+ 2.943,+ "Three point two four is three hundred twenty four divided by one hundred."+ ],+ [+ 7.63,+ "One point six is sixteen divided by ten."+ ],+ [+ 10.729,+ "Their product is three hundred twenty four times sixteen, divided by one thousand."+ ],+ [+ 16.484,+ "We can do the whole number multiplication first."+ ],+ [+ 19.453,+ "Two decimal places in the first factor and one in the second mean division by one hundred times ten."+ ],+ [+ 25.768,+ "That is division by one thousand: three decimal places in the product."+ ],+ [+ 30.807,+ "We are tracking scale, not guessing where a dot looks right."+ ]+ ]+ },+ "whole": {+ "dur": 36.672,+ "marks": {+ "ones": 6.68,+ "tens": 15.104,+ "sum": 27.539+ },+ "cues": [+ [+ 0.091,+ "Let us multiply three hundred twenty four by sixteen."+ ],+ [+ 3.815,+ "Align the ones columns of these whole numbers."+ ],+ [+ 6.68,+ "Six ones times three hundred twenty four gives one thousand nine hundred forty four."+ ],+ [+ 12.474,+ "Work right to left and carry when needed."+ ],+ [+ 15.104,+ "The next digit is one ten."+ ],+ [+ 17.422,+ "Its partial product is three thousand two hundred forty, not three hundred twenty four."+ ],+ [+ 23.32,+ "The zero holds the ones place because we multiplied by ten."+ ],+ [+ 27.539,+ "Add the two partial products to get five thousand one hundred eighty four."+ ],+ [+ 31.641,+ "Decimal multiplication uses this ordinary whole number calculation."+ ]+ ]+ },+ "point": {+ "dur": 33.0,+ "marks": {+ "restore": 4.167,+ "count": 11.654,+ "result": 20.612+ },+ "cues": [+ [+ 0.104,+ "Our whole number product is five thousand one hundred eighty four."+ ],+ [+ 4.167,+ "But the original factors were divided by one hundred and ten."+ ],+ [+ 7.8,+ "Restore that scale by dividing the product by one thousand."+ ],+ [+ 11.654,+ "Starting at the right, count three places: thousandths, hundredths, tenths."+ ],+ [+ 17.396,+ "The decimal point goes just after the five."+ ],+ [+ 20.612,+ "The result is five point one eight four."+ ],+ [+ 23.372,+ "We did not align the factors decimal points as in addition."+ ],+ [+ 27.331,+ "For multiplication, the important final count is the sum of their fractional places."+ ]+ ]+ },+ "estimate": {+ "dur": 30.72,+ "marks": {+ "bound": 6.172,+ "correct": 13.75,+ "reject": 17.005+ },+ "cues": [+ [+ 0.091,+ "A size check can catch a misplaced point."+ ],+ [+ 2.669,+ "Three point two four is between three and four."+ ],+ [+ 6.172,+ "Multiplying those bounds by the positive number one point six puts the product between four point eight and six point four."+ ],+ [+ 13.75,+ "Five point one eight four fits inside that interval."+ ],+ [+ 17.005,+ "Fifty one point eight four is much too large."+ ],+ [+ 20.352,+ "Zero point five one eight four is much too small."+ ],+ [+ 23.854,+ "An estimate does not replace the exact calculation, but it is an excellent alarm for a decimal point error."+ ]+ ]+ },+ "q2": {+ "dur": 4.488,+ "marks": {},+ "cues": [+ [+ 0.091,+ "Quick check."+ ],+ [+ 1.094,+ "Which board gives the correct partial product for the tens digit?"+ ]+ ]+ },+ "small": {+ "dur": 39.72,+ "marks": {+ "sides": 11.419,+ "grid": 15.469,+ "result": 23.776,+ "zeros": 34.102+ },+ "cues": [+ [+ 0.104,+ "What if both factors are much smaller than one?"+ ],+ [+ 2.956,+ "Here the reference square is only one tenth wide and one tenth high."+ ],+ [+ 7.982,+ "It is drawn larger so we can see the pieces."+ ],+ [+ 11.419,+ "Take a width of six hundredths and a height of four hundredths."+ ],+ [+ 15.469,+ "Each little cell is one hundredth by one hundredth."+ ],+ [+ 18.607,+ "Its area is one ten thousandth."+ ],+ [+ 21.289,+ "There are twenty four cells in the overlap."+ ],+ [+ 23.776,+ "Six times four is twenty four, and two fractional places plus two means four places."+ ],+ [+ 30.469,+ "The result is zero point zero zero two four."+ ],+ [+ 34.102,+ "Those zeros before the two keep it in the thousandths place."+ ],+ [+ 38.281,+ "They are part of the value."+ ]+ ]+ },+ "tiny": {+ "dur": 38.904,+ "marks": {+ "fractions": 5.938,+ "product": 12.135,+ "pad": 21.146,+ "exact": 29.909+ },+ "cues": [+ [+ 0.104,+ "Now multiply zero point zero zero four by zero point zero one two."+ ],+ [+ 5.938,+ "They are four thousandths and twelve thousandths."+ ],+ [+ 9.036,+ "Each factor has three fractional places."+ ],+ [+ 12.135,+ "Four times twelve is forty eight."+ ],+ [+ 14.648,+ "One thousand times one thousand is one million."+ ],+ [+ 17.695,+ "So the exact product is forty eight millionths."+ ],+ [+ 21.146,+ "We need six places to the right of the decimal point."+ ],+ [+ 24.453,+ "Forty eight fills the last two."+ ],+ [+ 26.94,+ "Fill the four earlier places with zeros."+ ],+ [+ 29.909,+ "The answer is zero point zero zero zero zero four eight."+ ],+ [+ 34.609,+ "Keep it exact."+ ],+ [+ 35.794,+ "Rounding too soon would erase the entire product."+ ]+ ]+ },+ "trailing": {+ "dur": 40.584,+ "marks": {+ "keep": 10.729,+ "count": 17.526,+ "result": 24.388,+ "simplify": 28.607+ },+ "cues": [+ [+ 0.104,+ "Trailing zeros need careful bookkeeping."+ ],+ [+ 3.242,+ "Zero point two five zero has three written fractional digits."+ ],+ [+ 7.878,+ "Zero point six zero has two."+ ],+ [+ 10.729,+ "If we keep those digits, we multiply two hundred fifty by sixty, giving fifteen thousand."+ ],+ [+ 17.526,+ "We must then count all five written fractional places, because our scales were one thousand and one hundred."+ ],+ [+ 24.388,+ "That makes zero point one five zero zero zero."+ ],+ [+ 28.607,+ "Only now can we remove trailing fractional zeros from the result."+ ],+ [+ 33.047,+ "The value is zero point one five."+ ],+ [+ 35.859,+ "The integer product and the place count must come from the same version of the factors."+ ]+ ]+ },+ "trim": {+ "dur": 36.096,+ "marks": {+ "factors": 1.914,+ "whole": 11.81,+ "count": 18.125,+ "same": 24.466+ },+ "cues": [+ [+ 0.104,+ "There is also a shorter route."+ ],+ [+ 1.914,+ "First simplify the factors: zero point two five zero becomes zero point two five, and zero point six zero becomes zero point six."+ ],+ [+ 11.81,+ "Now the matching whole numbers are twenty five and six."+ ],+ [+ 15.716,+ "Their product is one hundred fifty."+ ],+ [+ 18.125,+ "Two fractional places plus one means three, giving zero point one five zero."+ ],+ [+ 24.466,+ "Again the value is zero point one five."+ ],+ [+ 27.552,+ "Either route works."+ ],+ [+ 28.984,+ "Mixing the longer integer product with the shorter place count changes the value, so keep your bookkeeping together."+ ]+ ]+ },+ "integer": {+ "dur": 42.6,+ "marks": {+ "fraction": 10.599,+ "whole": 17.917,+ "answer": 22.318,+ "care": 28.607+ },+ "cues": [+ [+ 0.091,+ "An integer ending in zero is different."+ ],+ [+ 3.099,+ "Two hundred forty times zero point zero zero three has only three fractional places in total."+ ],+ [+ 10.599,+ "Two hundred forty is already a whole number."+ ],+ [+ 13.503,+ "It is not twenty four."+ ],+ [+ 14.987,+ "The other factor is three thousandths."+ ],+ [+ 17.917,+ "Multiply two hundred forty by three to get seven hundred twenty."+ ],+ [+ 22.318,+ "Divide by one thousand: zero point seven two zero, or zero point seven two."+ ],+ [+ 28.607,+ "Dropping the zero from two hundred forty first would give only zero point zero seven two, ten times too small."+ ],+ [+ 36.406,+ "You may simplify trailing fractional zeros, not delete a whole numbers place value."+ ]+ ]+ },+ "q3": {+ "dur": 7.272,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Quick check."+ ],+ [+ 1.146,+ "Choose the place chart for the exact product of zero point zero six and zero point zero four."+ ]+ ]+ },+ "context": {+ "dur": 42.576,+ "marks": {+ "multiply": 8.906,+ "places": 14.388,+ "money": 24.766+ },+ "cues": [+ [+ 0.091,+ "Ribbon costs six dollars and forty cents per meter."+ ],+ [+ 3.646,+ "We buy two point seven five meters."+ ],+ [+ 6.094,+ "Multiplication gives the total price."+ ],+ [+ 8.906,+ "Six hundred forty times two hundred seventy five is one hundred seventy six thousand."+ ],+ [+ 14.388,+ "Each written factor has two fractional places, so divide by ten thousand."+ ],+ [+ 19.792,+ "The exact result is seventeen point six zero zero zero."+ ],+ [+ 24.766,+ "For money, we display two decimal places: seventeen dollars and sixty cents."+ ],+ [+ 31.029,+ "The final zeros do not change the value."+ ],+ [+ 34.206,+ "This price is plausible: a little less than three meters at a little over six dollars per meter costs a little less than nineteen dollars."+ ]+ ]+ },+ "wrap": {+ "dur": 28.92,+ "marks": {+ "w1": 1.784,+ "w2": 8.112,+ "w3": 13.385,+ "w4": 17.617+ },+ "cues": [+ [+ 0.104,+ "Keep these four moves."+ ],+ [+ 1.784,+ "Multiply the matching whole numbers, with accurate carries and shifted partial products."+ ],+ [+ 8.112,+ "Count every fractional digit you used."+ ],+ [+ 11.055,+ "Their total tells you the products scale."+ ],+ [+ 13.385,+ "Add leading zeros when needed, and check the size of the answer."+ ],+ [+ 17.617,+ "Simplify trailing fractional zeros after calculating, or simplify the factors first and use the matching shortened calculation."+ ],+ [+ 26.758,+ "Now try the chapter practice."+ ]+ ]+ },+ "final1": {+ "dur": 7.128,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter practice, one of three."+ ],+ [+ 2.448,+ "Multiply exactly."+ ],+ [+ 4.128,+ "Preserve all the leading zeros you need."+ ]+ ]+ },+ "final2": {+ "dur": 8.112,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter practice, two of three."+ ],+ [+ 2.383,+ "Keep zeros and decimal places consistent with the calculation you actually use."+ ]+ ]+ },+ "final3": {+ "dur": 6.84,+ "marks": {},+ "cues": [+ [+ 0.091,+ "Chapter practice, three of three."+ ],+ [+ 2.604,+ "Use multiplication to solve each measurement or price problem."+ ]+ ]+ },+ "finish": {+ "dur": 11.208,+ "marks": {},+ "cues": [+ [+ 0.104,+ "Chapter nine complete."+ ],+ [+ 1.667,+ "The size of a decimal product comes from the size of its factors."+ ],+ [+ 5.469,+ "Keep those scales matched, and the decimal point has a reason to be exactly where it belongs."+ ]+ ]+ }+};diff --git a/site/math-notebook/ch09/audio/en/tiny.mp3 b/site/math-notebook/ch09/audio/en/tiny.mp3new file mode 100644index 0000000..66bbfd5Binary files /dev/null and b/site/math-notebook/ch09/audio/en/tiny.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/trailing.mp3 b/site/math-notebook/ch09/audio/en/trailing.mp3new file mode 100644index 0000000..004736eBinary files /dev/null and b/site/math-notebook/ch09/audio/en/trailing.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/trim.mp3 b/site/math-notebook/ch09/audio/en/trim.mp3new file mode 100644index 0000000..9c21dc1Binary files /dev/null and b/site/math-notebook/ch09/audio/en/trim.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/whole.mp3 b/site/math-notebook/ch09/audio/en/whole.mp3new file mode 100644index 0000000..434d7f0Binary files /dev/null and b/site/math-notebook/ch09/audio/en/whole.mp3 differdiff --git a/site/math-notebook/ch09/audio/en/wrap.mp3 b/site/math-notebook/ch09/audio/en/wrap.mp3new file mode 100644index 0000000..975dac9Binary files /dev/null and b/site/math-notebook/ch09/audio/en/wrap.mp3 differdiff --git a/site/math-notebook/ch09/index.html b/site/math-notebook/ch09/index.htmlnew file mode 100644index 0000000..1bb0eb5--- /dev/null+++ b/site/math-notebook/ch09/index.html@@ -0,0 +1,73 @@+<!doctype html>+<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Multiplying Decimals — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.screen .blanks .math{font-size:38px}.side .keys{font-size:20px}</style></head><body>+<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>+'use strict';+const CHAPTER={number:9,title:'Multiplying Decimals',minutes:12,language:'en'};+const dmText=(p,s,x,y,t=0,size=30,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};+const dmMath=(p,s,x,y,t=0,size=48,col=COL.chalk,anchor='middle')=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};+const dmTitle=(p,s,sub='')=>{dmText(p,s,100,115,.1,43);if(sub)dmText(p,sub,100,165,.15,27,COL.dim);};+function dmArea(p,{x=210,y=275,size=400,cols=4,rows=3,unit=.1,tWidth=.2,tHeight=.2,tCells=.2,tGrid=.2,label=true}={}){+ const g=G(p,{x,y}),d=size/10,base=unit*10;+ mk('rect',{width:size,height:size,fill:'none',stroke:COL.chalk,'stroke-width':3},g);+ const a=G(g,{o:0});mk('rect',{width:d*cols,height:size,fill:COL.whole,'fill-opacity':.22},a);show(a,tWidth);+ const b=G(g,{o:0});mk('rect',{width:size,height:d*rows,fill:COL.nat,'fill-opacity':.22},b);show(b,tHeight);+ const c=G(g,{o:0});mk('rect',{width:d*cols,height:d*rows,fill:COL.task,'fill-opacity':.55,stroke:COL.task,'stroke-width':3},c);c.dataset.product=String(cols*rows*unit*unit);c.dataset.width=String(cols*unit);c.dataset.height=String(rows*unit);show(c,tCells);+ const grid=G(g,{o:0});for(let i=1;i<10;i++){path(grid,`M${i*d} 0V${size}`,{stroke:COL.chalk,'stroke-width':1,'stroke-opacity':.65});path(grid,`M0 ${i*d}H${size}`,{stroke:COL.chalk,'stroke-width':1,'stroke-opacity':.65});}show(grid,tGrid);+ if(label){dmText(g,`${base===1?'1':base.toFixed(1)} unit wide`,size/2,-32,.2,27,COL.dim,'middle');dmText(g,`${base===1?'1':base.toFixed(1)} unit high`,size/2,size+40,.2,27,COL.dim,'middle');}+ return {g,a,b,c,grid,d};+}+function dmPlace(p,digits,{x=330,y=400,t=.2,places=['ones','tenths','hundredths','thousandths'],step=160,size=72}={}){+ const g=G(p,{x,y,o:0});show(g,t);const ones=Math.max(0,places.indexOf('ones'));+ places.forEach((s,i)=>{const numeric=places[0]==='1',hy=numeric&&i%2===0?-122:-90;T(g,s,{x:i*step,y:hy,size:numeric?22:places.length>6?19:24,anchor:'middle',fill:COL.dim});if(numeric)path(g,`M${i*step} ${hy+10}V-68`,{stroke:COL.faint,'stroke-width':1});mk('rect',{x:i*step-step*.43,y:-65,width:step*.86,height:95,rx:12,fill:'none',stroke:COL.faint,'stroke-width':2},g);T(g,digits[i]??'',{x:i*step,y:10,size,font:'monospace',anchor:'middle'});});+ T(g,'.',{x:(ones+.5)*step,y:10,size,font:'monospace',anchor:'middle',fill:COL.task});return g;+}+function dmWhole(p,{x=470,y=280,t=.2,tOnes=.2,tTens=.2,tSum=.2,wrong=false,mini=false}={}){+ const g=G(p,{x,y}),size=mini?49:68,dy=mini?72:96,end=mini?285:350;+ ['324','× 16'].forEach((s,i)=>dmText(g,s,end,i*dy,t,size,COL.chalk,'end'));+ path(g,`M${end-5*size*.6} ${dy+24}H${end+20}`,{stroke:COL.chalk,'stroke-width':3});+ dmText(g,'1944',end,dy*2,tOnes,size,COL.chalk,'end');dmText(g,wrong?'324':'3240',end,dy*3,tTens,size,COL.task,'end');+ if(!mini){path(g,`M${end-5*size*.6} ${dy*3+28}H${end+20}`,{stroke:COL.chalk,'stroke-width':3});dmText(g,'5184',end,dy*4+24,tSum,size,COL.task,'end');}+ return g;+}+function dmPatch(p,x,cols,rows,label){const g=G(p);dmText(g,label,x+130,255,.2,31,COL.dim,'middle');const model=dmArea(g,{x,y:315,size:260,cols,rows,unit:.1,tWidth:0,tHeight:0,tCells:.2,tGrid:.2,label:false});put(model.a,{o:0});put(model.b,{o:0});dmText(g,cols*rows+' hundredths',x+130,625,.2,28,COL.task,'middle');return {el:g,box:[x-15,270,290,375],label:`${label}: ${cols*rows} hundredths`};}+function dmZeroChart(p,x,ds,label){const g=G(p);dmText(g,label,x+205,255,.2,30,COL.dim,'middle');dmPlace(g,ds,{x:x+20,y:415,t:.2,places:['1','0.1','0.01','0.001','0.0001','0.00001'],step:70,size:48});dmText(g,'0.'+ds.slice(1).join(''),x+200,560,.2,45,COL.task,'middle');return {el:g,box:[x-15,290,450,315],label:'0.'+ds.slice(1).join('')};}+const BEATS=[+['intro','Products have scale',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 1 · The Number System · Chapter 9',{x:800,y:265,size:28,fill:COL.dim,anchor:'middle'});T(g,'Multiplying',{x:800,y:375,size:82,weight:600,anchor:'middle'});T(g,'Decimals',{x:800,y:475,size:82,weight:600,anchor:'middle'});tw(g,{o:1,y:0},.2,1,out);dmMath(g,'0.4 × 0.3',800,590,.6,60);const s=dmText(scene,'The decimal point has a reason.',800,710,m('sub'),34,COL.dim,'middle');hide(g,D-.8,.7);hide(s,D-.8,.7);}],+['area','Tenths times tenths',m=>{const p=panel(0);dmTitle(p,'0.4 × 0.3','One full square = 1 square unit');const a=dmArea(p,{tWidth:m('width'),tHeight:m('height'),tCells:m('cells'),tGrid:m('cells')});dmText(p,'width: 4 tenths',1050,290,m('width'),36,COL.whole,'middle');dmText(p,'height: 3 tenths',1050,375,m('height'),36,COL.nat,'middle');dmText(p,'4 × 3 = 12 cells',1050,495,m('cells'),38,COL.task,'middle');dmText(p,'each cell = 1 hundredth',1050,565,m('cells',2),31,COL.dim,'middle');dmMath(p,'0.4 × 0.3 = 0.12',1050,675,m('answer'),53);}],+['fraction','Why the places add',m=>{const p=panel(0);dmTitle(p,'One tenth × one tenth = one hundredth');dmArea(p,{x:170,y:300,size:330});dmMath(p,[F('4','10'),' × ',F('3','10')],1060,325,m('frac'),58);dmMath(p,[F('4 × 3','10 × 10'),' = ',F('12','100')],1060,505,m('denom'),58);dmMath(p,'0.12',1060,660,m('result'),66,COL.task);dmText(p,'1 place + 1 place = 2 fractional places',800,800,m('result',2),35,COL.task,'middle');}],+['q1','Quick check',()=>{const p=panel(0);dmTitle(p,'Which patch represents 0.4 × 0.3?','All three full squares represent 1 square unit.');S.dmPatch=[dmPatch(p,180,4,3,'A'),dmPatch(p,670,7,10,'B'),dmPatch(p,1160,4,10,'C')];},{ask:done=>quiz(BAND,[{id:'c-area',prompt:'Choose the product area: four tenths wide and three tenths high.',build:pickEls(S.dmPatch,0,'A contains 4 × 3 = 12 hundredth cells: 0.12.',i=>i===1?'B shows 70 hundredths, or 0.7, the sum of 0.4 and 0.3. Multiplication selects an overlap.':'C shows 40 hundredths, or 0.4. We need only three tenths of that height.',()=>pulseFx(S.dmPatch[0].el,1.03))}],done)}],+['scale','Multiply and restore the scale',m=>{const p=panel(0);dmTitle(p,'3.24 × 1.6','Decimals are fractions with powers of ten as denominators.');dmMath(p,['3.24 = ',F('324','100')],390,325,m('first'),56);dmText(p,'2 fractional places',390,420,m('first'),31,COL.whole,'middle');dmMath(p,['1.6 = ',F('16','10')],1120,325,m('second'),56);dmText(p,'1 fractional place',1120,420,m('second'),31,COL.nat,'middle');dmMath(p,[F('324 × 16','100 × 10'),' = ',F('5184','1000')],800,620,m('multiply'),58);dmText(p,'2 + 1 = 3 places → divide by 1000',800,780,m('count'),38,COL.task,'middle');}],+['whole','The whole-number calculation',m=>{const p=panel(0);dmTitle(p,'324 × 16','Align whole-number ones. Each row keeps its place value.');dmWhole(p,{x:170,y:265,tOnes:m('ones'),tTens:m('tens'),tSum:m('sum')});dmText(p,'324 × 6 = 1944',1060,450,m('ones'),36,COL.chalk,'middle');dmText(p,'carry 2, then carry 1',1060,505,m('ones',2),28,COL.dim,'middle');dmText(p,'324 × 10 = 3240',1060,590,m('tens'),36,COL.task,'middle');dmText(p,'The 1 in 16 means ONE TEN.',1060,650,m('tens',2),29,COL.dim,'middle');dmText(p,'1944 + 3240 = 5184',1060,760,m('sum'),36,COL.task,'middle');}],+['point','Three fractional places',m=>{const p=panel(0);dmTitle(p,'5184 ÷ 1000','Restore the scales used in 3.24 × 1.6.');dmMath(p,'2 places + 1 place = 3',800,260,.2,48);dmPlace(p,['5','1','8','4'],{x:480,y:495,t:m('restore'),step:210});dmText(p,'4 → thousandths 8 → hundredths 1 → tenths',800,620,m('count'),32,COL.dim,'middle');dmMath(p,'3.24 × 1.6 = 5.184',800,765,m('result'),62,COL.task);}],+['estimate','Check the size',m=>{const p=panel(0);dmTitle(p,'3.24 × 1.6','A reasonable range helps catch a misplaced point.');dmMath(p,'3 < 3.24 < 4',800,285,.2,59);dmMath(p,'4.8 < 3.24 × 1.6 < 6.4',800,435,m('bound'),59);const x=350,y=555,w=900;path(p,`M${x} ${y}H${x+w}`,{stroke:COL.dim,'stroke-width':3});[4.8,5.184,6.4].forEach((v,i)=>{const px=x+(v-4.8)/1.6*w;mk('circle',{cx:px,cy:y,r:i===1?12:7,fill:i===1?COL.task:COL.chalk,opacity:0},p);const e=p.lastChild;show(e,i===1?m('correct'):m('bound'));dmText(p,String(v),px,610,i===1?m('correct'):m('bound'),31,i===1?COL.task:COL.dim,'middle');});dmText(p,'0.5184: too small 51.84: too large',800,755,m('reject'),38,COL.task,'middle');}],+['q2','Quick check',()=>{const p=panel(0);dmTitle(p,'The 1 in 16 is in the TENS place.','Which partial-product board preserves that value?');S.dmWhole=[0,1].map(j=>{const x=170+j*780,g=dmWhole(p,{x,y:280,mini:true,wrong:j===1});dmText(p,j?'B':'A',x+190,235,.2,31,COL.dim,'middle');dmText(p,j?'324 × 1':'324 × 10',x+190,590,.2,32,COL.task,'middle');return {el:g,box:[x-5,260,410,370],label:j?'B: partial product 324':'A: partial product 3240'};});},{ask:done=>quiz(BAND,[{id:'c-shift',prompt:'Choose the board with the correct tens-row partial product.',build:pickEls(S.dmWhole,0,'A uses 324 × 10 = 3240. The tens digit needs a shifted row or a zero in the ones place.',()=> 'B uses 324 × 1. But the 1 in 16 means ten, so the partial product must be 3240.',()=>pulseFx(S.dmWhole[0].el,1.03))}],done)}],+['small','A product smaller than both factors',m=>{const p=panel(0);dmTitle(p,'0.06 × 0.04','Reference square: 0.1 × 0.1 = 0.01 square unit · drawn larger');dmArea(p,{x:165,y:285,size:400,cols:6,rows:4,unit:.01,tWidth:m('sides'),tHeight:m('sides'),tCells:m('grid'),tGrid:m('grid')});dmText(p,'width 0.06 · height 0.04',1060,285,m('sides'),32,COL.dim,'middle');dmText(p,'each cell = 0.01 × 0.01',1060,390,m('grid'),32,COL.dim,'middle');dmText(p,'24 ten-thousandths',1060,475,m('grid',2),37,COL.task,'middle');dmMath(p,'24 ÷ 10000 = 0.0024',1060,615,m('result'),46,COL.task);dmText(p,'2 + 2 = 4 fractional places',1060,700,m('result'),30,COL.dim,'middle');dmText(p,'Leading zeros keep the 2 in the thousandths place.',800,815,m('zeros'),31,COL.task,'middle');}],+['tiny','Make room for leading zeros',m=>{const p=panel(0);dmTitle(p,'0.004 × 0.012','An exact product: no rounding.');dmMath(p,[F('4','1000'),' × ',F('12','1000')],800,310,m('fractions'),58);dmMath(p,[F('48','1000000')],800,435,m('product'),54);dmPlace(p,['0','0','0','0','0','4','8'],{x:230,y:625,t:m('pad'),places:['ones','tenths','hundredths','thousandths','ten-thousandths','hundred-thousandths','millionths'],step:190,size:64});dmMath(p,'0.000048',800,795,m('exact'),66,COL.task);}],+['trailing','Keep all the written digits',m=>{const p=panel(0);dmTitle(p,'0.250 × 0.60','Route A: keep every written fractional digit.');dmMath(p,'250 × 60 = 15000',800,310,m('keep'),58);dmText(p,'3 places + 2 places = 5 places',800,425,m('count'),38,COL.task,'middle');dmMath(p,[F('15000','100000'),' = 0.15000'],800,605,m('result'),59);dmMath(p,'0.15000 = 0.15',800,780,m('simplify'),58,COL.task);}],+['trim','Or simplify the factors FIRST',m=>{const p=panel(0);dmTitle(p,'0.250 × 0.60','Route B: shorten the factors before multiplying.');dmMath(p,'0.25 × 0.6',800,305,m('factors'),65);dmMath(p,'25 × 6 = 150',800,435,m('whole'),58);dmText(p,'2 places + 1 place = 3 places',800,555,m('count'),38,COL.task,'middle');dmMath(p,'150 ÷ 1000 = 0.150 = 0.15',800,720,m('same'),57,COL.task);dmText(p,'Matching integers + matching place count',800,815,m('same',2),31,COL.dim,'middle');}],+['integer','A whole-number zero has value',m=>{const p=panel(0);dmTitle(p,'240 × 0.003','240 has ZERO fractional places.');dmMath(p,['240 × ',F('3','1000')],800,305,m('fraction'),59);dmMath(p,'240 × 3 = 720',800,440,m('whole'),59);dmMath(p,'720 ÷ 1000 = 0.720 = 0.72',800,615,m('answer'),57,COL.task);dmText(p,'240 ≠ 24',800,740,m('care'),41,COL.task,'middle');dmText(p,'Dropping an integer zero makes the answer ten times too small.',800,805,m('care',2),31,COL.dim,'middle');}],+['q3','Quick check',()=>{const p=panel(0);dmTitle(p,'0.06 × 0.04 = 24 ÷ 10000','Chart headings show each digit’s place value. Extra trailing zeros are fine.');S.dmZero=[dmZeroChart(p,105,['0','0','0','2','4','0'],'A'),dmZeroChart(p,585,['0','0','2','4','0','0'],'B'),dmZeroChart(p,1065,['0','0','0','0','2','4'],'C')];},{ask:done=>quiz(BAND,[{id:'c-small',prompt:'Choose the product chart. Leading zeros must preserve place value.',build:pickEls(S.dmZero,0,'A shows 24 ten-thousandths: 0.0024. The first nonzero digit is in the thousandths place.',i=>i===1?'B shows 0.024, ten times too large. Two places plus two places requires four fractional places.':'C shows 0.00024, ten times too small. Its 2 starts one place too far right.',()=>pulseFx(S.dmZero[0].el,1.02))}],done)}],+['context','Price times amount',m=>{const p=panel(0);dmTitle(p,'Ribbon · $6.40 per meter × 2.75 meters','The price for each meter is multiplied by the number of meters.');dmText(p,'rate × amount = total price',800,290,.2,38,COL.dim,'middle');dmMath(p,'640 × 275 = 176000',800,420,m('multiply'),58);dmText(p,'2 + 2 = 4 written fractional places',800,540,m('places'),36,COL.task,'middle');dmMath(p,'176000 ÷ 10000 = 17.6000',800,650,m('places',2),54);dmMath(p,'$17.60',800,780,m('money'),70,COL.task);}],+['wrap','Four reliable moves',m=>{const p=panel(0);[['Multiply whole numbers; shift each partial product.','w1'],['Add the fractional places of the digits you used.','w2'],['Keep leading zeros. Check the size.','w3'],['Trim fractional zeros carefully; keep scales matched.','w4']].forEach(([s,k],i)=>{const g=G(p,{x:-16,y:235+i*145,o:0});mk('circle',{cx:150,cy:-10,r:26,fill:COL.task},g);T(g,String(i+1),{x:150,y:0,size:30,anchor:'middle',fill:COL.board});T(g,s,{x:215,size:34});tw(g,{x:0,o:1},m(k),.6);});}],+['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-products',prompt:'Multiply exactly. Equivalent trailing zeros are accepted.',build:blanks([+{parts:['2.35 × 1.4 = ',{box:'3.29'}],why:'235 × 14 = 3290. Three fractional places gives 3.290 = 3.29.',hint:'The whole-number partial products are 940 and 2350.'},+{parts:['36 × 0.025 = ',{box:'0.9'}],why:'36 × 25 = 900. Zero plus three fractional places gives 0.900 = 0.9.'},+{parts:['0.08 × 0.07 = ',{box:'0.0056'}],why:'8 × 7 = 56, with four fractional places: 0.0056.'},+{parts:['0.006 × 0.013 = ',{box:'0.000078'}],why:'6 × 13 = 78, with six fractional places: 0.000078.',hint:'Pad the places before 78 with leading zeros.'}+])}],done,'Chapter practice 1 of 3')}],+['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-zeros',prompt:'Keep the product and the place count consistent.',build:blanks([+{parts:['0.420 × 0.50 = ',{box:'0.21'}],why:'420 × 50 = 21000 with five places: 0.21000 = 0.21. Or trim FIRST: 42 × 5 = 210 with three places.'},+{parts:['520 × 0.0003 = ',{box:'0.156'}],why:'520 × 3 = 1560, with four fractional places: 0.1560. The integer zero stays.'},+{parts:['0.30 × 0.40 = ',{box:'0.12'}],why:'30 × 40 = 1200, with four fractional places: 0.1200 = 0.12.'},+{parts:['235 × 14: tens-row partial = ',{box:'2350'}],why:'The 1 in 14 means ten. The partial product is 235 × 10 = 2350, then add the ones-row 940.'}+])}],done,'Chapter practice 2 of 3')}],+['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[+{id:'p-price',prompt:'Cloth costs $4.80 per meter. You buy 3.25 meters. Find the total price.',build:blanks([{parts:['$',{box:'15.60'}],why:'4.80 × 3.25 = 15.6000, displayed as $15.60.'}])},+{id:'p-map',prompt:'Each centimeter on a map represents 2.4 meters. What distance do 3.75 centimeters represent?',build:blanks([{parts:[{box:'9'},' meters'],why:'2.4 × 3.75 = 9.000 = 9 meters.'}])},+{id:'p-distance',prompt:'A walker travels 0.18 kilometers per minute for 7.5 minutes. Find the distance.',build:blanks([{parts:[{box:'1.35'},' kilometers'],why:'0.18 × 7.5 = 1.350 = 1.35 kilometers.'}])},+{id:'p-volume',prompt:'A straight-sided container holds 0.025 liters for each centimeter of water height. It is filled to 0.4 centimeter. Find the volume.',build:blanks([{parts:[{box:'0.01'},' liters'],why:'0.025 × 0.4 = 0.0100 = 0.01 liters. Four fractional places before simplification.'}])}+],done,'Chapter practice 3 of 3')}],+['finish','Finished',()=>panel(0),{ask:finishCard}]+].map(([id,title,run,extra])=>({id,title,run,...extra}));+boot();+</script></body></html>diff --git a/site/math-notebook/index.html b/site/math-notebook/index.htmlindex d20c502..91d86dc 100644--- a/site/math-notebook/index.html+++ b/site/math-notebook/index.html@@ -229,7 +229,7 @@ main#contents { padding-bottom: 80px; }'use strict';// Chapters are numbered in order through the units. Add a chapter here when its lesson is ready.const UNITS = [ // [unit title, [[chapter title, minutes], ...]]; chapters are numbered in order. Add a chapter when its lesson is ready.- ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10], ['Fraction Basics: Types of Fractions and Adding and Subtracting Fractions', 13], ['Multiplying and Dividing Fractions', 12], ['Adding and Subtracting Decimals', 11]]],+ ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10], ['Fraction Basics: Types of Fractions and Adding and Subtracting Fractions', 13], ['Multiplying and Dividing Fractions', 12], ['Adding and Subtracting Decimals', 11], ['Multiplying Decimals', 12]]],];const HUES = ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'];const id = n => 'ch' + String(n).padStart(2, '0');