source: git/kernel/p_Numbers.h @ bc669c

fieker-DuValspielwiese
Last change on this file since bc669c was 341696, checked in by Hans Schönemann <hannes@…>, 15 years ago
Adding Id property to all files git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.0 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/***************************************************************
5 *  File:    p_Numbers.h
6 *  Purpose: macros/inline functions for number operations
7 *  Author:  obachman (Olaf Bachmann)
8 *  Created: 8/00
9 *  Version: $Id$
10 *******************************************************************/
11#ifndef P_NUMBERS_H
12#define P_NUMBERS_H
13
14#include "numbers.h"
15#define n_Copy_FieldGeneral(n, r)           (r)->cf->cfCopy(n,r)
16#define n_Delete_FieldGeneral(n, r)         (r)->cf->cfDelete(n,r)
17#define n_Mult_FieldGeneral(n1, n2, r)      (r)->cf->nMult(n1, n2)
18#define n_Add_FieldGeneral(n1, n2, r)       (r)->cf->nAdd(n1, n2)
19#define n_IsZero_FieldGeneral(n, r)         (r)->cf->nIsZero(n)
20#define n_Equal_FieldGeneral(n1, n2, r)     (r)->cf->nEqual(n1, n2)
21#define n_Neg_FieldGeneral(n, r)            (r)->cf->nNeg(n)
22#define n_Sub_FieldGeneral(n1, n2, r)       (r)->cf->nSub(n1, n2)
23//#define n_InpMult_FieldGeneral(n1, n2, r)   (r)->cf->nInpMult(n1, n2, r)
24#define n_InpMult_FieldGeneral(n1, n2, r)   ndInpMult(n1, n2, r)
25#define n_InpAdd_FieldGeneral(n1, n2, r)    n1=ndInpAdd(n1, n2, r)
26
27#ifdef HAVE_RINGS
28#define n_Copy_RingGeneral(n, r)           (r)->cf->cfCopy(n,r)
29#define n_Delete_RingGeneral(n, r)         (r)->cf->cfDelete(n,r)
30#define n_Mult_RingGeneral(n1, n2, r)      (r)->cf->nMult(n1, n2)
31#define n_Add_RingGeneral(n1, n2, r)       (r)->cf->nAdd(n1, n2)
32#define n_IsZero_RingGeneral(n, r)         (r)->cf->nIsZero(n)
33#define n_Equal_RingGeneral(n1, n2, r)     (r)->cf->nEqual(n1, n2)
34#define n_Neg_RingGeneral(n, r)            (r)->cf->nNeg(n)
35#define n_Sub_RingGeneral(n1, n2, r)       (r)->cf->nSub(n1, n2)
36//#define n_InpMult_RingGeneral(n1, n2, r)   (r)->cf->nInpMult(n1, n2, r)
37#define n_InpMult_RingGeneral(n1, n2, r)   ndInpMult(n1, n2, r)
38#define n_InpAdd_RingGeneral(n1, n2, r)    n1=ndInpAdd(n1, n2, r)
39#endif
40
41#include "modulop.h"
42#define n_Copy_FieldZp(n, r)        n
43#define n_Delete_FieldZp(n, r)      ((void)0)
44#define n_Mult_FieldZp(n1, n2, r)   npMultM(n1,n2)
45#define n_Add_FieldZp(n1, n2, r)    npAddM(n1, n2)
46#define n_IsZero_FieldZp(n, r)      npIsZeroM(n)
47#define n_Equal_FieldZp(n1, n2, r)  npEqualM(n1, n2)
48#define n_Neg_FieldZp(n, r)         npNegM(n)
49#define n_Sub_FieldZp(n1, n2, r)    npSubM(n1, n2)
50#define n_InpMult_FieldZp(n1, n2, r) n1=npMultM(n1, n2)
51#define n_InpAdd_FieldZp(n1, n2, r)  n1=npAddM(n1, n2)
52
53#define DO_LINLINE
54#include "longrat.cc"
55#define n_Copy_FieldQ(n, r)        nlCopy(n)
56#define n_Delete_FieldQ(n, r)      nlDelete(n,r)
57#define n_Mult_FieldQ(n1, n2, r)   nlMult(n1,n2)
58#define n_Add_FieldQ(n1, n2, r)    nlAdd(n1, n2)
59#define n_IsZero_FieldQ(n, r)      nlIsZero(n)
60#define n_Equal_FieldQ(n1, n2, r)  nlEqual(n1, n2)
61#define n_Neg_FieldQ(n, r)         nlNeg(n)
62#define n_Sub_FieldQ(n1, n2, r)    nlSub(n1, n2)
63#define n_InpMult_FieldQ(n1, n2, r) nlInpMult(n1, n2, r)
64#define n_InpAdd_FieldQ(n1, n2, r)  n1=nlInpAdd(n1, n2, r)
65#endif
Note: See TracBrowser for help on using the repository browser.