Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

An exact whole power with a huge exponent hangs evaluation: 2^(10^9), 2^(3^20)

Đang mở
#1,448 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ASC-Community/AngouriMath

Tất cả issue của ASC-Community/AngouriMath

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.