Yingbo Ma

Results 223 comments of Yingbo Ma

Does SymEngine use a polynomial data structure to expand and convert it back to an unstructured expression tree or does it exclusively work on the unstructured expression tree?

Here is Nemo's performance: ```julia julia> using Nemo, BenchmarkTools julia> R, (a, b, c) = PolynomialRing(ZZ, [:a, :b, :c]); julia> p = a+b+c+1; julia> @btime $p^20; 258.569 μs (25 allocations:...

Does it use the multinomial theorem to expand power of sums?

Ah, so that explains it. We don't have that specialization at all. For some polynomial operations, we do a round trip to multivariate polynomial representations and back. @shashi is more...

Does the MWE alone not qualify as a bug? What's the use case for egality other than a theoretically nice sounding property?

Isn't it obvious? For example: ```julia julia> using SparseArrays, LinearAlgebra, BenchmarkTools julia> N = 500; A = diagm(0=>rand(BigFloat, N), 1=>rand(BigFloat, N-1)); julia> S = spzeros(BigFloat, N, N); S .= A;...

I don't find the proposed fix particularly convincing, because should people always write `S[A .!= 0] .= A[A .!= 0]` for generic programming? The point of the above example is...

This doesn't just happen with `diagm` though. This happens whenever one assigns dense matrices into a sparse matrix, if the eltype is big, and the underlaying issue is precisely due...