Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

An exact zero test for algebraic numbers, for when downcasting is removed

未关闭
#2,164 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
backend, compilers

调研方向

Start by reading the referenced issues #1019, #1497, #2143, and #2163 to understand the downcasting change, interval evaluator, and current zero checks. Then trace how algebraic radicals are represented and evaluated in the repository; the issue does not name source files or tests. Done means an algebraic expression can be tested for exact zero using a polynomial derived from its defining radicals and an isolating interval to identify the zero root.

由索引模型根据 Issue 内容生成。

描述

A constant built from radicals currently reaches 0 by evaluation. It is computed to 100 digits, and downcasting takes any residual under 1e-50 as 0 (measured on #2143). So a check that answers 0 cannot tell an identity from a near miss. For example, take 8y^3 + 4y^2 - 4y - 1 at the Cardano root for cos(2pi/7):

  • as written, it simplifies to 0;
  • with one 7 changed to 7 + 10^(-50), it also simplifies to 0, although its value is 2.48e-52 - 3.26e-52 i.

#1019 removes downcasting in v3. A constant like this one then no longer reaches 0 at all, and two things depend on it reaching 0 today:

  • GroebnerSystemSolver.Satisfies accepts a candidate root when InnerSimplified comes out 0 (#2163).
  • The trigonometric table's radical entries, such as the one sin(pi/7) is rewritten into, are checked only numerically, by TrigTest, to about 97 digits.

Proposal: decide e = 0 exactly for an algebraic e, in two steps:

  1. Compute a polynomial that e is a root of, from the polynomials that define its radicals, as SymPy's minimal_polynomial does.
  2. If 0 is one of that polynomial's roots, decide whether e is that root, using an isolating interval from the interval evaluator (#1497).

For sin(pi/7), the steps are the four in the answer on #2143.

References: Algebraic number, Minimal polynomial (field theory).

主要语言
C#
星标
831
派生
79
平均合并
1 小时 17 分钟
30 天内合并 PR
543

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ASC-Community/AngouriMath 的其他 Issue

查看 ASC-Community/AngouriMath 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。