Loading...
Searching...
No Matches
shortfl.h File Reference
`#include "misc/auxiliary.h"`
`#include "omalloc/omalloc.h"`

Go to the source code of this file.

## Macros

#define | SI_FLOAT float

## Functions

BOOLEAN | nrInitChar (coeffs r, void *)
| Initialize r.
SI_FLOAT | nrFloat (number n)
| Converts a n_R number into a float. Needed by Maps.

## Macro Definition Documentation

## SI_FLOAT

#define SI_FLOAT float

Definition at line 15 of file shortfl.h.

## Function Documentation

## nrFloat()

SI_FLOAT nrFloat | ( | number | n | ) |

Converts a n_R number into a float. Needed by Maps.

Definition at line 48 of file shortfl.cc.

{
return nf(n).F();
}
nf
Definition gnumpfl.cc:25
nf::F
SI_FLOAT F() const
Definition gnumpfl.cc:30

## nrInitChar()

BOOLEAN nrInitChar | ( | coeffs | r,
|  | void * | p )

Initialize r.

Definition at line 658 of file shortfl.cc.

{
assume( getCoeffType(n) == n_R );
assume( p == NULL );
n->is_field=TRUE;
n->is_domain=TRUE;
n->rep=n_rep_float;
//n->cfKillChar = ndKillChar; /* dummy */
n->ch = 0;
n->cfCoeffName = nrCoeffName;
n->cfCoeffString = nrCoeffString;
n->cfInit = nrInit;
n->cfInt = nrInt;
n->cfAdd = nrAdd;
n->cfSub = nrSub;
n->cfMult = nrMult;
n->cfDiv = nrDiv;
n->cfExactDiv= nrDiv;
n->cfInpNeg = nrNeg;
n->cfInvers= nrInvers;
//n->cfCopy = ndCopy;
n->cfGreater = nrGreater;
n->cfEqual = nrEqual;
n->cfIsZero = nrIsZero;
n->cfIsOne = nrIsOne;
n->cfIsMOne = nrIsMOne;
n->cfGreaterZero = nrGreaterZero;
n->cfWriteLong = nrWrite;
n->cfRead = nrRead;
//n->cfPower = nrPower;
n->cfSetMap = nrSetMap;
/* nName= ndName; */
/*nSize = ndSize;*/
#ifdef LDEBUG
n->cfDBTest=nrDBTest; // not yet implemented: nrDBTest;
#endif
//n->nCoeffIsEqual = ndCoeffIsEqual;
n->float_len = SHORT_REAL_LENGTH;
n->float_len2 = SHORT_REAL_LENGTH;
// TODO: Any variables?
return FALSE;
}
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
p
int p
Definition cfModGcd.cc:4086
n_R
@ n_R
single prescision (6,6) real numbers
Definition coeffs.h:31
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition coeffs.h:431
n_rep_float
@ n_rep_float
(float), see shortfl.h
Definition coeffs.h:123
assume
#define assume(x)
Definition mod2.h:389
SHORT_REAL_LENGTH
#define SHORT_REAL_LENGTH
Definition numbers.h:57
NULL
#define NULL
Definition omList.c:12
nrSub
static number nrSub(number a, number b, const coeffs r)
Definition shortfl.cc:126
nrMult
static number nrMult(number a, number b, const coeffs r)
Definition shortfl.cc:60
nrCoeffName
static char * nrCoeffName(const coeffs r)
Definition shortfl.cc:653
nrSetMap
static nMapFunc nrSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type: n_R.
Definition shortfl.cc:617
nrDBTest
static BOOLEAN nrDBTest(number a, const char *f, const int l, const coeffs r)
Definition shortfl.cc:370
nrInvers
static number nrInvers(number c, const coeffs r)
Definition shortfl.cc:197
nrDiv
static number nrDiv(number a, number b, const coeffs r)
Definition shortfl.cc:183
nrAdd
static number nrAdd(number a, number b, const coeffs r)
Definition shortfl.cc:94
nrNeg
static number nrNeg(number c, const coeffs r)
Definition shortfl.cc:210
nrEqual
static BOOLEAN nrEqual(number a, number b, const coeffs r)
Definition shortfl.cc:224
nrWrite
static void nrWrite(number a, const coeffs r)
Definition shortfl.cc:232
nrCoeffString
static char * nrCoeffString(const coeffs r)
Definition shortfl.cc:648
nrRead
static const char * nrRead(const char *s, number *a, const coeffs r)
Definition shortfl.cc:299
nrIsZero
static BOOLEAN nrIsZero(number a, const coeffs r)
Definition shortfl.cc:158
nrInit
static number nrInit(long i, const coeffs r)
Definition shortfl.cc:70
nrGreater
static BOOLEAN nrGreater(number a, number b, const coeffs r)
Definition shortfl.cc:217
nrIsMOne
static BOOLEAN nrIsMOne(number a, const coeffs r)
Definition shortfl.cc:174
nrIsOne
static BOOLEAN nrIsOne(number a, const coeffs r)
Definition shortfl.cc:165
nrInt
static long nrInt(number &n, const coeffs r)
Definition shortfl.cc:81
nrGreaterZero
static BOOLEAN nrGreaterZero(number k, const coeffs r)
Definition shortfl.cc:53