/* -*- gp-script -*- */ \\% Numerator and Denominator working for type t_POL. \\ Author: Joerg Arndt \\ License: GPL version 3 or later \\ online at http://www.jjj.de/pari/ \\ version: 2014-October-16 (18:31) Numer(t)= { \\ Meaningful numerator even if type happens to be t_POL if ( t==0, return(0) ); if ( type(t)=="t_POL", return(Denom(1/t)) ); return( numerator(t) ); } /* ----- */ Denom(t)= { \\ Meaningful denominator even if type happens to be t_POL if ( t==0, return(1) ); if ( type(t)=="t_POL", return(Numer(1/t)) ); return( denominator(t) ); } /* ----- */ \\ ==== end of file ====