Bill Allombert on Tue, 10 Jul 2018 11:08:38 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Mysterious type t_RFRAC and denominator function |
On Mon, Jul 09, 2018 at 08:58:25PM +0000, Jacques Gélinas wrote: > What is "t_RFRAC" or a denominator exactly ? A t_RFRAC is a rational function. > # type(a/b) > %1 = "t_POL" > # type(b/a) > %2 = "t_RFRAC" > # denominator(a/b) > %3 = 1 > # denominator(b/a) > %4 = a > > Can one conclude that the symbol "a' is treated differently than the symbol "b" ? No. Variables have priorities, which depends in which order they are created by GP. In your example a is introduced before b so has higher priority. so you are computing in Q(b)(a) and not Q(a)(b). So a/b is a polynomial in a while b/a is a rational function in a. It follows that the denominators are 1 and a respectively. This is documented in ??"Variable priorities, multivariate objects"@2 Cheers, Bill