An exact whole power with a huge exponent hangs evaluation: 2^(10^9), 2^(3^20)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 32/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- Active
- Stack technique
- csharp
- Domaine
- performance
Piste de recherche
Start by reproducing the two expressions through ToEntity().Evaled and trace the Number.Pow/BinaryIntPow path described in the issue. Review the quantifier witness-search path and related issue #1338, then establish the chosen behavior for oversized exact powers and confirm that witness searches remain bounded without silently losing exactness.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
"2^(10^9)".ToEntity().Evaled and "2^(3^20)".ToEntity().Evaled do not return (killed at 60 s each; 2^(3^12) returns in 1 s). The result of the first is a 10⁹-bit integer (125 MB) and of the second a 3.5·10⁹-bit one; Number.Pow's BinaryIntPow builds them by squaring in EInteger, and the last squarings are Toom-4 multiplications of numbers hundreds of megabytes long. Measured on 8fcfaf42 (a branch of 345914f6); the code path is unchanged since long before.
Found through a quantifier: forall n in ZZ* : 3^(n + 1) divides 2^(3^n) + 1 (Sullivan and Mackey's Prob 5.7.13) hangs because a witness search evaluates the body at n = 20 or so, where 2^(3^n) is the second number above. Any consumer that evaluates a tower at a large argument hits the same.
What the answer should be is the decision to make, and it belongs with #1338's numerics: an exact power whose result would exceed some size — say 2²⁴ bits, which is 2 MB and a fraction of a second — is either (a) left as written (2^(10^9) evaluates to itself, the way an unsolved statement stays a statement), or (b) refused with an exception naming the limit, or (c) evaluated approximately as Real at the working precision, which is what a decimal calculator does and loses exactness silently. (a) is the honest one under not answering is legitimate; answering wrongly is not, and it composes: a witness search that gets an unevaluated power back moves on. Until then, a quantifier's witness search should skip a sample it cannot evaluate in bounded time, which is the narrower fix I would take first.
Part of #1409.
🤖 Generated with Claude Code
- 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
-
[Tool] DirectBenchOuvertehas-image has-readme needs-attention new-tool repo-verified
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
shanselman/TinyToolTown#844 · 2 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
[i18n] 安装实例完成后的成功提示未正确本地化Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
PCL-Community/PCL-CE#3658 ·
Les mainteneurs répondent en général sous 1 jour
-
Deploy & Patch-issues opprettes ikke: create-pnd-issues.yml har feilet hver uke siden 2025-09-08Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Altinn/altinn-auth#4359 ·
Les mainteneurs répondent en général sous 1 jour
-
アプリ: チャット 優先: 中 提案
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
yksr-melt/Meltype#243 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Workflows: a workflow stored with null conditions is skipped with an exception instead of runOuvertebug core
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour