From c609e73148854327fd6bb69c1f6152e449491a6f Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Tue, 5 May 2020 01:00:57 +0200 Subject: [PATCH 1/3] rational-numbers: Make formulas more readable --- exercises/rational-numbers/description.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exercises/rational-numbers/description.md b/exercises/rational-numbers/description.md index 91652d82a7..0588266855 100644 --- a/exercises/rational-numbers/description.md +++ b/exercises/rational-numbers/description.md @@ -2,21 +2,21 @@ A rational number is defined as the quotient of two integers `a` and `b`, called The absolute value `|r|` of the rational number `r = a/b` is equal to `|a|/|b|`. -The sum of two rational numbers `r1 = a1/b1` and `r2 = a2/b2` is `r1 + r2 = a1/b1 + a2/b2 = (a1 * b2 + a2 * b1) / (b1 * b2)`. +The sum of two rational numbers `r₁ = a₁/b₁` and `r₂ = a₂/b₂` is `r₁ + r₂ = a₁/b₁ + a₂/b₂ = (a₁ * b₂ + a₂ * b₁) / (b₁ * b₂)`. -The difference of two rational numbers `r1 = a1/b1` and `r2 = a2/b2` is `r1 - r2 = a1/b1 - a2/b2 = (a1 * b2 - a2 * b1) / (b1 * b2)`. +The difference of two rational numbers `r₁ = a₁/b₁` and `r₂ = a₂/b₂` is `r₁ - r₂ = a₁/b₁ - a₂/b₂ = (a₁ * b₂ - a₂ * b₁) / (b₁ * b₂)`. -The product (multiplication) of two rational numbers `r1 = a1/b1` and `r2 = a2/b2` is `r1 * r2 = (a1 * a2) / (b1 * b2)`. +The product (multiplication) of two rational numbers `r₁ = a₁/b₁` and `r₂ = a₂/b₂` is `r₁ * r₂ = (a₁ * a₂) / (b₁ * b₂)`. -Dividing a rational number `r1 = a1/b1` by another `r2 = a2/b2` is `r1 / r2 = (a1 * b2) / (a2 * b1)` if `a2 * b1` is not zero. +Dividing a rational number `r₁ = a₁/b₁` by another `r₂ = a₂/b₂` is `r₁ / r₂ = (a₁ * b₂) / (a₂ * b₁)` if `a₂ * b₁` is not zero. -Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `r^n = (a^n)/(b^n)`. +Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `rⁿ = aⁿ/bⁿ`. -Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `r^n = (b^m)/(a^m)`, where `m = |n|`. +Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `rⁿ = bᵐ/aᵐ`, where `m = |n|`. -Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `(a^x)/(b^x)`, which is a real number. +Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `aˣ/bˣ`, which is a real number. -Exponentiation of a real number `x` to a rational number `r = a/b` is `x^(a/b) = root(x^a, b)`, where `root(p, q)` is the `q`th root of `p`. +Exponentiation of a real number `x` to a rational number `r = a/b` is `x^(a/b) = root(xᵃ, b)`, where `root(p, q)` is the `q`th root of `p`. Implement the following operations: - addition, subtraction, multiplication and division of two rational numbers, From cf3c70e352880abc015907ca59121b7962a9ac0f Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Tue, 5 May 2020 11:15:40 +0200 Subject: [PATCH 2/3] Remove superscript characters --- exercises/rational-numbers/description.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/rational-numbers/description.md b/exercises/rational-numbers/description.md index 0588266855..48eb5a21cb 100644 --- a/exercises/rational-numbers/description.md +++ b/exercises/rational-numbers/description.md @@ -10,13 +10,13 @@ The product (multiplication) of two rational numbers `r₁ = a₁/b₁` and `r Dividing a rational number `r₁ = a₁/b₁` by another `r₂ = a₂/b₂` is `r₁ / r₂ = (a₁ * b₂) / (a₂ * b₁)` if `a₂ * b₁` is not zero. -Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `rⁿ = aⁿ/bⁿ`. +Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `r^n = a^n/b^n`. -Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `rⁿ = bᵐ/aᵐ`, where `m = |n|`. +Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `r^n = b^m/a^m`, where `m = |n|`. -Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `aˣ/bˣ`, which is a real number. +Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `a^x/b^x`, which is a real number. -Exponentiation of a real number `x` to a rational number `r = a/b` is `x^(a/b) = root(xᵃ, b)`, where `root(p, q)` is the `q`th root of `p`. +Exponentiation of a real number `x` to a rational number `r = a/b` is `x^(a/b) = root(x^a, b)`, where `root(p, q)` is the `q`th root of `p`. Implement the following operations: - addition, subtraction, multiplication and division of two rational numbers, From d7c29d5ea50682dce660fce1d320149d5adc696b Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Thu, 7 May 2020 16:56:39 +0200 Subject: [PATCH 3/3] Readd parentheses --- exercises/rational-numbers/description.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/rational-numbers/description.md b/exercises/rational-numbers/description.md index 48eb5a21cb..621f8a123b 100644 --- a/exercises/rational-numbers/description.md +++ b/exercises/rational-numbers/description.md @@ -10,11 +10,11 @@ The product (multiplication) of two rational numbers `r₁ = a₁/b₁` and `r Dividing a rational number `r₁ = a₁/b₁` by another `r₂ = a₂/b₂` is `r₁ / r₂ = (a₁ * b₂) / (a₂ * b₁)` if `a₂ * b₁` is not zero. -Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `r^n = a^n/b^n`. +Exponentiation of a rational number `r = a/b` to a non-negative integer power `n` is `r^n = (a^n)/(b^n)`. -Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `r^n = b^m/a^m`, where `m = |n|`. +Exponentiation of a rational number `r = a/b` to a negative integer power `n` is `r^n = (b^m)/(a^m)`, where `m = |n|`. -Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `a^x/b^x`, which is a real number. +Exponentiation of a rational number `r = a/b` to a real (floating-point) number `x` is the quotient `(a^x)/(b^x)`, which is a real number. Exponentiation of a real number `x` to a rational number `r = a/b` is `x^(a/b) = root(x^a, b)`, where `root(p, q)` is the `q`th root of `p`.