# ginacsympy
**Repository Path**: mufei/ginacsympy
## Basic Information
- **Project Name**: ginacsympy
- **Description**: No description available
- **Primary Language**: Python
- **License**: GPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-09-30
- **Last Updated**: 2026-09-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://pepy.tech/project/ginacsympy)

# GinacSympy: GinacSym Python Wrappers
A Cython frontend to the C++ library GinacSym (https://github.com/mithun218/ginacsym), a fast C++ symbolic manipulation library.
## Introduction
GinacSym (made on GiNaC, https://ginac.de) is a fast C++ symbolic manipulation library released under GPL v2 or above. It has many features:
- It is build on C and C++ libraries:
gmp,mpfr,flint,cln
- It provides fast computations for multivariate polynomial operations (expansion and factorisation) using flint library, and
- symbolic computations: solving linear or nonlinear systems of equations, simplifications, series, limit, differentiation, integration, Infinity, functions with dependend variable, real symbol,complex symbol,...
- It has many special functions which are computed using flint library.
- Linear Algebra with numerical or symbolic coefficients.
- Indexed objects, tensors, symmetrization
- Clifford algebra
- Color algebra
- and many more
GinacSympy is an interface to this library. It is built with cython.
## Motivation
We are aware of the existence of the Sympy Python Library, a full computer algebra system. However, because sympy is a pure Python library (Sympy now depends on mpmath as an external library), symbolic manipulation of huge algebraic expressions is slow using it. Consequently, we have made an effort to create a computer algebra system that is both extremely fast in comparison to Sympy and quite simple to install, much like sympy.
## Installation
GinacSympy releases are available as wheel packages for Windows and Linux on [PyPi](https://pypi.org/project/ginacsympy). Install it using pip:
python -m pip install -U pip
python -m pip install -U ginacsympy
To install **GinacSympy** from source, follow these steps:
#### 1. Prerequisites
First, compile the underlying C++ library:
* **GinacSym**: [https://github.com/mithun218/ginacsym](https://github.com/mithun218/ginacsym)
Ensure you have the required build tools installed in your Python environment:
* `setuptools`
* `Cython` (version > 3.0.0)
`pip install "Cython>3.0.0" setuptools
`
#### 2. Build and Install
Open a terminal, navigate to the GinacSympy root directory, and run the following commands
python setup.py build_ext
python setup.py install
## Short usage
>>>from ginacsympy import *
>>>a,b,c,d=Ex('a,b,c,d')
>>>expr=(a+b+c+d)**5
>>>expr=expr.expand()
>>>expr.factor()
(a+b+c+d)**5
>>>from ginacsympy_abc import *
>>>(x**2*y+y*x+y*x*b+a*x+b*x**2*y).collect(lst([x,y]),True)
x**2*(1+b)*y+x*(1+b)*y+a*x
For in-depth documentation [click here.](https://mithun218.github.io/ginacsympy/)