Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions src/config/cohort1-promotions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,51 @@ export const COHORT1_PROMOTIONS: ReadonlyMap<string, Cohort1Promotion> = new Map
],
['percentage-increase-calculator', { references: [OPENSTAX_PERCENT] }],
['percentage-decrease-calculator', { references: [OPENSTAX_PERCENT] }],
[
'gcd-lcm-calculator',
{
references: [
openstax(
'10.6 Introduction to Factoring Polynomials (Prealgebra 2e)',
'https://openstax.org/books/prealgebra-2e/pages/10-6-introduction-to-factoring-polynomials',
'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.',
),
openstax(
'2.5 Prime Factorization and the Least Common Multiple (Prealgebra 2e)',
'https://openstax.org/books/prealgebra-2e/pages/2-5-prime-factorization-and-the-least-common-multiple',
'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.',
),
],
},
],
// Finance
[
'vat-calculator',
{
references: [
{
title: 'Charge, reclaim and record VAT: Charging VAT',
publisher: 'GOV.UK',
url: 'https://www.gov.uk/charge-reclaim-record-vat',
accessed: ACCESSED,
supports:
'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.',
},
],
},
],
[
'simple-interest-calculator',
{
references: [
openstax(
'6.3 Simple Interest (Contemporary Mathematics)',
'https://openstax.org/books/contemporary-mathematics/pages/6-3-simple-interest',
'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.',
),
],
},
],
// Loans
['loan-calculator', { references: [CFPB_AMORTIZING] }],
['auto-loan-calculator', { references: [CFPB_AMORTIZING] }],
Expand Down
2 changes: 2 additions & 0 deletions tests/registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ describe('the real registry', () => {
'compound-interest-calculator',
'loan-calculator',
'mortgage-calculator',
'simple-interest-calculator',
'vat-calculator',
]);
// generated finance pages exist too; the six hand-written ones are the seeds
expect(getCalculatorsByCategory('finance', { includeUnpublished: true }).filter((c) => handWritten.some((h) => h.slug === c.slug))).toHaveLength(6);
Expand Down
Loading