Dividing by a reciprocal gives a value where the quotient has none: 1/(1/x) is x
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Start with O4 in SimplificationContract.md and reproduce the listed expressions using work/soundcheck. Trace the named rules in Common, CollapseMultipleFractions, Power, CommonDenominator, and Trigonometric, then compare with the rational canonical form issue #1618. Done means simplification preserves the original definedness conditions and regression checks cover the reported cases.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What you ran:
"1/(1/x)".Simplify();
"(x^(-1))^(-1)".Simplify();
"a / csc(x)".Simplify();
"1 / sec(x)".Simplify();
"1 / cotan(x)".Simplify();
"a / (b / x)".Simplify();
"a / x^(-1)".Simplify();
"(y + 2) / y^(-1)".Simplify();
What it did: each answer has a value where the expression has none. Measured on master at dcf5ba7c:
| expression | Simplify |
at | expression there | answer there |
|---|---|---|---|---|
1/(1/x) |
x |
x = 0 | NaN | 0 |
(x^(-1))^(-1) |
x |
x = 0 | NaN | 0 |
a / csc(x) |
sin(x) * a |
x = 0 | NaN | 0 |
1 / sec(x) |
cos(x) |
x = pi/2 | NaN | 0 |
1 / cotan(x) |
tan(x) |
x = 0 | NaN | 0 |
a / (b / x) |
a * x / b provided not b = 0 |
x = 0 | NaN | 0 |
a / x^(-1) |
a * x |
x = 0 | NaN | 0 |
(y + 2) / y^(-1) |
(2 + y) * y |
y = 0 | NaN | 0 |
The last one keeps b's condition and drops x's.
What it should have done: keep the condition the expression was defined under, as cancelling already does: (1/x)/(1/x) is 1 provided not x = 0. O4 of SimplificationContract.md forbids turning undefined into a value.
The rules that do it, found by applying each rule on its own and comparing both sides at sample points (work/soundcheck, for #1252): dividing-by-a-quotient-multiplies-by-its-reciprocal (Common), quotient-whose-denominator-is-a-quotient and quotient-of-two-quotients (CollapseMultipleFractions), a-power-of-a-power-multiplies-the-exponents (Power), a-quotient-of-symbolic-parts-is-grouped-pairwise (CommonDenominator, at all three levels), and a-quotient-by-a-cosecant-is-a-sine (Trigonometric). a-power-times-a-product-containing-its-own-base-raises-the-exponent widens too (y^0 * y → y^1), but Simplify keeps that condition by another route. #1618 is the same defect in the rational canonical form.
- Langage dominant
- C#
- Étoiles
- 831
- Forks
- 79
- Merge moyen
- 2 h 22 min
- PR mergées (30 j)
- 507
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ASC-Community/AngouriMath
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
ASC-Community/AngouriMath#1807 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
ASC-Community/AngouriMath#1692 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
ASC-Community/AngouriMath#1690 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
ASC-Community/AngouriMath#1689 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
ASC-Community/AngouriMath#1684 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ASC-Community/AngouriMath
Issues similaires
-
type/automation type/tech-debt
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
High-DPI fixes for release/1.3: editor toolbar icons and Color Picker layout (patch included)Ouverteno-stack-trace
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Les mainteneurs répondent en général sous 1 jour
-
v9 review: TestingOuvertedocs/external squad/utforming
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Altinn/altinn-studio#21041 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
stryker-mutator/stryker-net#3892 ·
Les mainteneurs répondent en général sous 1 jour