Ratnormal computes a rational normal form of a sum of rational expressions (products of integer powers of polynomials with integer coefficients). It tries to do this fast.
To build Ratnormal first install GiNaC [1] and FLINT [2] libraries, and then run:
make
ratnormal
-- compute rational normal form of a sum of rational
expressions.
ratnormal
[-mndhC] [-j threads] input [output]
ratnormal
reads an input file, which must contain a sum of
rational expressions (products of integer powers of polynomials with
integer coefficients), and brings the sum under a common denominator,
cancelling the fractions if needed, and preserving the factorization
of the denominator.
ratnormal
uses the FLINT library.
$ echo '2/3/(x + 2*y^2)^2 - 1/(x + 6*x*y^2)' | ratnormal -
(
1/3 *
1/(6*x*y^2+x) *
1/(x+2*y^2)^2 *
(-3*x^2+2*x-12*y^4)
)
-
-n
Allow expanding the final numerator to improve performance.
-
-d
Allow expanding the final denominator.
-
-m
Take the common monomials out of the brackets at the end.
-
-j threads
Use this many worker threads, if possible (default: 1).
-
-h
Show this help message.
-
-C
Force colored output even if stderr is not a tty.
-
-V
Print version information.
-
input
Read the input expression from this file, with "-" meaning the standard input.
-
output
Write the result into this file, with "-" meaning the standard output (which is the default).
Vitaly Magerya