JuliaSymbolics/SymbolicUtils.jl
Tentang
Ekspresi simbolik, penulisan ulang, dan penyederhanaan.
Proyek lainnyaPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- +2
- dalam 15 hari
- +2
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliSymbolicUtils.jl
Tutorials and Documentation
For information on using the package, see the stable documentation. Use the in-development documentation for the version of the documentation, which contains the unreleased features.
SymbolicUtils.jl provides various utilities for symbolic computing. SymbolicUtils.jl is what one would use to build a Computer Algebra System (CAS). If you're looking for a complete CAS, similar to SymPy or Mathematica, see Symbolics.jl. If you want to build a crazy CAS for your weird Octonian algebras, you've come to the right place.
Symbols in SymbolicUtils carry type information. Operations on them propagate this information. A rule-based rewriting language can be used to find subexpressions that satisfy arbitrary conditions and apply arbitrary transformations on the matches. The library also contains a set of useful simplification rules for expressions of numeric symbols and numbers. These can be remixed and extended for special purposes.
If you are a Julia package developer in need of a rule rewriting system for your own types, have a look at the interfacing guide.
"I don't want to read your manual, just show me some cool code"
julia> using SymbolicUtils
julia> SymbolicUtils.show_simplified[] = true
julia> @syms x::Real y::Real z::Complex{Real} f(::Number)::Real
(x, y, z, f(::Number)::Real)
julia> 2x^2 - y + x^2
(3 * (x ^ 2)) + (-1 * y)
julia> f(sin(x)^2 + cos(x)^2) + z
f(1) + z
julia> r = @rule sinh(im * ~x) => sin(~x)
sinh(im * ~x) => sin(~x)
julia> r(sinh(im * y))
sin(y)
julia> simplify(cos(y)^2 + sinh(im*y)^2, RuleSet([r]))
1
Citations
- The pattern matcher is an adaption of the one by Gerald Jay Sussman (as seen in 6.945 at MIT), his use of symbolic programming in the book SICM inspired this package.
- Rewrite.jl and Simplify.jl by Harrison Grodin also inspired this package.
Jelajahi proyek terkait
Memuat…