Skip to content

Commit 1e34031

Browse files
Promote VAT, simple interest and GCD/LCM into Cohort 1 with sources that were opened and read (#37)
GOV.UK charging VAT, OpenStax Contemporary Mathematics 6.3, OpenStax Prealgebra 2e 10.6 and 2.5. Still out: credit card payoff and unit price (no page I could open), pregnancy due date (ACOG refuses the fetch), hourly to salary (2,080 vs OPM 2,087). Claude-Session: https://claude.ai/code/session_01UF6i2KwsUbWdrANYXssrSX Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent c10c23c commit 1e34031

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

‎src/config/cohort1-promotions.ts‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,51 @@ export const COHORT1_PROMOTIONS: ReadonlyMap<string, Cohort1Promotion> = new Map
144144
],
145145
['percentage-increase-calculator', { references: [OPENSTAX_PERCENT] }],
146146
['percentage-decrease-calculator', { references: [OPENSTAX_PERCENT] }],
147+
[
148+
'gcd-lcm-calculator',
149+
{
150+
references: [
151+
openstax(
152+
'10.6 Introduction to Factoring Polynomials (Prealgebra 2e)',
153+
'https://openstax.org/books/prealgebra-2e/pages/10-6-introduction-to-factoring-polynomials',
154+
'The greatest common factor of numbers by prime factorization, with the example that the GCF of 24 and 36 is 12. The calculator uses the Euclidean algorithm, which this page does not describe; it gives the same result.',
155+
),
156+
openstax(
157+
'2.5 Prime Factorization and the Least Common Multiple (Prealgebra 2e)',
158+
'https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple',
159+
'The least common multiple by the prime factors method (find the prime factorizations, match primes in columns, bring down each column, multiply). The formula lcm = a x b / gcd is not stated on this page.',
160+
),
161+
],
162+
},
163+
],
164+
// Finance
165+
[
166+
'vat-calculator',
167+
{
168+
references: [
169+
{
170+
title: 'Charge, reclaim and record VAT: Charging VAT',
171+
publisher: 'GOV.UK',
172+
url: 'https://www.gov.uk/charge-reclaim-record-vat',
173+
accessed: ACCESSED,
174+
supports:
175+
'Adding VAT: multiply the price excluding VAT by 1.2 at the 20% standard rate or 1.05 at the 5% reduced rate (60 x 1.2 = 72), and taking it out: divide by 1.2 or 1.05 (180 / 1.20 = 150). The page describes the UK rates as current on the date read; this calculator accepts any rate.',
176+
},
177+
],
178+
},
179+
],
180+
[
181+
'simple-interest-calculator',
182+
{
183+
references: [
184+
openstax(
185+
'6.3 Simple Interest (Contemporary Mathematics)',
186+
'https://openstax.org/books/contemporary-mathematics/pages/6-3-simple-interest',
187+
'The simple interest formula I = P x r x t (principal, annual rate as a decimal, time in years) and the total repaid T = P + I.',
188+
),
189+
],
190+
},
191+
],
147192
// Loans
148193
['loan-calculator', { references: [CFPB_AMORTIZING] }],
149194
['auto-loan-calculator', { references: [CFPB_AMORTIZING] }],

‎tests/registry.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ describe('the real registry', () => {
7171
'compound-interest-calculator',
7272
'loan-calculator',
7373
'mortgage-calculator',
74+
'simple-interest-calculator',
75+
'vat-calculator',
7476
]);
7577
// generated finance pages exist too; the six hand-written ones are the seeds
7678
expect(getCalculatorsByCategory('finance', { includeUnpublished: true }).filter((c) => handWritten.some((h) => h.slug === c.slug))).toHaveLength(6);

0 commit comments

Comments
 (0)