You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 for10-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 for10-element array of BigFloat
julia> Pu =lmul!(pu, Matrix{BigFloat}(I, 10, 10));
julia> Pu-Pd # rigorously off by only one entry10×10 Array{BigFloat,2}:0.00.0-2.15904e-780.02.15904e-780.02.15904e-780.03.23856e-780.00.00.00.08.63617e-780.08.63617e-780.01.07952e-770.08.63617e-780.00.00.00.08.63617e-780.08.63617e-780.01.07952e-770.00.00.00.01.72723e-770.01.29543e-770.01.29543e-770.01.29543e-770.00.00.00.01.72723e-770.01.72723e-770.01.51133e-770.00.00.00.00.00.02.59085e-770.01.94314e-770.01.51133e-770.00.00.00.00.00.03.45447e-770.01.94314e-770.00.00.00.00.00.00.00.03.88628e-770.02.15904e-770.00.00.00.00.00.00.00.03.88628e-770.00.00.00.00.00.00.00.00.00.04.31808e-77
julia>
The text was updated successfully, but these errors were encountered:
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
ccall
s pass onBase.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 usingmpfr_neg
.The text was updated successfully, but these errors were encountered: