An exact whole power with a huge exponent hangs evaluation: 2^(10^9), 2^(3^20)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
"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
- Ngôn ngữ chính
- C#
- Star
- 831
- Fork
- 79
- Merge trung bình
- 2 giờ 22 phút
- Pull request đã merge (30 ngày)
- 507
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ASC-Community/AngouriMath
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
ASC-Community/AngouriMath#1807 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
ASC-Community/AngouriMath#1692 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
ASC-Community/AngouriMath#1690 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
ASC-Community/AngouriMath#1689 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
ASC-Community/AngouriMath#1684 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ASC-Community/AngouriMath
Issue tương tự
-
type/automation type/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-integrations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Problem launching the programĐang mở:watch: Not Triaged dotnet-framework/svc install-deployment/subsvc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Tool] DirectBenchĐang mởhas-image has-readme needs-attention new-tool repo-verified
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
shanselman/TinyToolTown#844 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
:watch: Not Triaged Pri3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày