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

Validated transforms

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
julia
领域
backend

调研方向

先复现 issue 中的 BigFloat RoundDown/RoundUp 示例,然后检查 src/transforms_mpfr.c 及其 ccall 算术。审查涉及的操作,包括报告的 mpfr_neg 情况,并验证已验证的 transforms 在两种舍入模式下都能正确运行且不会出现 token error。

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

描述

beginner

This would be fun. As seen below, it almost "just works," but would require a careful investigation into https://github.com/MikaelSlevinsky/FastTransforms/blob/master/src/transforms_mpfr.c. The ccalls pass on Base.MPFR.RoundingMode[] to the C library, so it's just a matter of making sure every arithmetic operation is appropriate for RoundUp/Down. For example, I think the token error is due to using mpfr_neg.

julia> using FastTransforms

julia> setrounding(BigFloat, RoundDown)
MPFRRoundDown::MPFRRoundingMode = 3

julia> pd = plan_leg2cheb(BigFloat, 10)
FastTransforms Legendre--Chebyshev plan for 10-element array of BigFloat

julia> Pd = lmul!(pd, Matrix{BigFloat}(I, 10, 10));

julia> setrounding(BigFloat, RoundUp)
MPFRRoundUp::MPFRRoundingMode = 2

julia> pu = plan_leg2cheb(BigFloat, 10)
FastTransforms Legendre--Chebyshev plan for 10-element array of BigFloat

julia> Pu = lmul!(pu, Matrix{BigFloat}(I, 10, 10));

julia> Pu-Pd # rigorously off by only one entry
10×10 Array{BigFloat,2}:
 0.0  0.0  -2.15904e-78  0.0          2.15904e-78  0.0          2.15904e-78  0.0          3.23856e-78  0.0        
 0.0  0.0   0.0          8.63617e-78  0.0          8.63617e-78  0.0          1.07952e-77  0.0          8.63617e-78
 0.0  0.0   0.0          0.0          8.63617e-78  0.0          8.63617e-78  0.0          1.07952e-77  0.0        
 0.0  0.0   0.0          1.72723e-77  0.0          1.29543e-77  0.0          1.29543e-77  0.0          1.29543e-77
 0.0  0.0   0.0          0.0          1.72723e-77  0.0          1.72723e-77  0.0          1.51133e-77  0.0        
 0.0  0.0   0.0          0.0          0.0          2.59085e-77  0.0          1.94314e-77  0.0          1.51133e-77
 0.0  0.0   0.0          0.0          0.0          0.0          3.45447e-77  0.0          1.94314e-77  0.0        
 0.0  0.0   0.0          0.0          0.0          0.0          0.0          3.88628e-77  0.0          2.15904e-77
 0.0  0.0   0.0          0.0          0.0          0.0          0.0          0.0          3.88628e-77  0.0        
 0.0  0.0   0.0          0.0          0.0          0.0          0.0          0.0          0.0          4.31808e-77

julia> 
主要语言
Julia
星标
282
派生
27
平均合并
53 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

JuliaApproximation/FastTransforms.jl 的其他 Issue

查看 JuliaApproximation/FastTransforms.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

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