Changeset 1cbb1f4 in git for Singular/LIB/poly.lib


Ignore:
Timestamp:
Jan 6, 2012, 9:13:51 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
79020f1e7903b16af027b1e0a1240dd1b386a87a
Parents:
0a3fa32bcd8b202183dc9d54b4f82cb6d069f087
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-06 21:13:51+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-06 21:59:37+01:00
Message:
(Trac Ticket #389) transfer denominator() and numerator() from poly.lib to the Singular kernel

ADD: new kernel functions denominator& numerator: number -> number
CHG: removed denominator& numerator from poly.lib
ADD: added documentation for these new kernel functions
FIX: updated tests (Manual/listvar.tst)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/poly.lib

    r0a3fa3 r1cbb1f4  
    2121 rad_con(p,I);          check radical containment of polynomial p in ideal I
    2222 content(f);            content of polynomial/vector f
    23  numerator(n);          numerator of number n
    24  denominator(n)         denominator of number n
    2523 mod2id(M,iv);          conversion of a module M to an ideal
    2624 id2mod(i,iv);          conversion inverse to mod2id
     
    904902///////////////////////////////////////////////////////////////////////////////
    905903
    906 proc numerator(number n)
    907 "USAGE:    numerator(n); n number
    908 RETURN:   number, the numerator of n
    909 SEE ALSO: denominator, content, cleardenom
    910 EXAMPLE:  example numerator; shows an example
    911 "
    912 {
    913   poly p = cleardenom(n+var(1));
    914   return (number(coeffs(p,var(1))[1,1]));
    915 }
    916 example
    917 {
    918   "EXAMPLE:"; echo = 2;
    919   ring r = 0,x, dp;
    920   number n = 3/2;
    921   numerator(n);
    922 }
    923 ///////////////////////////////////////////////////////////////////////////////
    924 
    925 proc denominator(number n)
    926 "USAGE:    denominator(n); n number
    927 RETURN:   number, the denominator of n
    928 SEE ALSO: numerator, content, cleardenom
    929 EXAMPLE:  example denominator; shows an example
    930 "
    931 {
    932   poly p = cleardenom(n+var(1));
    933   return (number(coeffs(p,var(1))[2,1]));
    934 }
    935 example
    936 {
    937   "EXAMPLE:"; echo = 2;
    938   ring r = 0,x, dp;
    939   number n = 3/2;
    940   denominator(n);
    941 }
    942 ////////////////////////////////////////////////////////////////////////
    943 
    944904////////////////////////////////////////////////////////////////////////
    945905// The idea of the procedures mod2id, id2mod and subrInterred is, to
Note: See TracChangeset for help on using the changeset viewer.