source: git/Singular/p_Mult_nn__T.cc @ 6cf5e6

spielwiese
Last change on this file since 6cf5e6 was a3bc95e, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: namespaces ->ns git-svn-id: file:///usr/local/Singular/svn/trunk@5651 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 937 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.3 2001-10-09 16:36:15 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.