source: git/kernel/p_Mult_nn__T.cc @ f3a8c2e

spielwiese
Last change on this file since f3a8c2e was 35aab3, checked in by Hans Schönemann <hannes@…>, 21 years ago
This commit was generated by cvs2svn to compensate for changes in r6879, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 941 bytes
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/***************************************************************
5 *  File:    p_Mult_n__Template.cc
6 *  Purpose: template for p_Mult_n
7 *  Author:  obachman (Olaf Bachmann)
8 *  Created: 8/00
9 *  Version: $Id: p_Mult_nn__T.cc,v 1.1.1.1 2003-10-06 12:16:00 Singular Exp $
10 *******************************************************************/
11
12/***************************************************************
13 *
14 *   Returns:  p*n
15 *   Destroys: p
16 *   Const:    n
17 *
18 ***************************************************************/
19LINKAGE poly p_Mult_nn(poly p, const number n, const ring r)
20{
21  pAssume(!n_IsZero(n,r));
22  p_Test(p, r);
23
24  poly q = p;
25  while (p != NULL)
26  {
27    number nc = pGetCoeff(p);
28    pSetCoeff0(p, n_Mult(n, nc, r));
29    n_Delete(&nc, r);
30    pIter(p);
31  }
32  p_Test(q, r);
33  return q;
34}
35
36
Note: See TracBrowser for help on using the repository browser.