My Project
Loading...
Searching...
No Matches
Macros | Functions
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. More...
 
SI_FLOAT nrFloat (number n)
 Converts a n_R number into a float. Needed by Maps. More...
 

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.

49{
50 return nf(n).F();
51}
Definition: gnumpfl.cc:25
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.

659{
660 assume( getCoeffType(n) == n_R );
661
662 assume( p == NULL );
663
664 n->is_field=TRUE;
665 n->is_domain=TRUE;
666 n->rep=n_rep_float;
667
668 //n->cfKillChar = ndKillChar; /* dummy */
669 n->ch = 0;
670 n->cfCoeffName = nrCoeffName;
671 n->cfCoeffString = nrCoeffString;
672
673 n->cfInit = nrInit;
674 n->cfInt = nrInt;
675 n->cfAdd = nrAdd;
676 n->cfSub = nrSub;
677 n->cfMult = nrMult;
678 n->cfDiv = nrDiv;
679 n->cfExactDiv= nrDiv;
680 n->cfInpNeg = nrNeg;
681 n->cfInvers= nrInvers;
682 //n->cfCopy = ndCopy;
683 n->cfGreater = nrGreater;
684 n->cfEqual = nrEqual;
685 n->cfIsZero = nrIsZero;
686 n->cfIsOne = nrIsOne;
687 n->cfIsMOne = nrIsMOne;
688 n->cfGreaterZero = nrGreaterZero;
689 n->cfWriteLong = nrWrite;
690 n->cfRead = nrRead;
691 //n->cfPower = nrPower;
692 n->cfSetMap = nrSetMap;
693
694 /* nName= ndName; */
695 /*nSize = ndSize;*/
696#ifdef LDEBUG
697 n->cfDBTest=nrDBTest; // not yet implemented: nrDBTest;
698#endif
699
700 //n->nCoeffIsEqual = ndCoeffIsEqual;
701
702 n->float_len = SHORT_REAL_LENGTH;
703 n->float_len2 = SHORT_REAL_LENGTH;
704
705 // TODO: Any variables?
706 return FALSE;
707}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
int p
Definition: cfModGcd.cc:4078
@ n_R
single prescision (6,6) real numbers
Definition: coeffs.h:31
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:422
@ n_rep_float
(float), see shortfl.h
Definition: coeffs.h:116
#define assume(x)
Definition: mod2.h:389
#define SHORT_REAL_LENGTH
Definition: numbers.h:57
#define NULL
Definition: omList.c:12
static number nrSub(number a, number b, const coeffs r)
Definition: shortfl.cc:126
static number nrMult(number a, number b, const coeffs r)
Definition: shortfl.cc:60
static char * nrCoeffName(const coeffs r)
Definition: shortfl.cc:653
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
static BOOLEAN nrDBTest(number a, const char *f, const int l, const coeffs r)
Definition: shortfl.cc:370
static number nrInvers(number c, const coeffs r)
Definition: shortfl.cc:197
static number nrDiv(number a, number b, const coeffs r)
Definition: shortfl.cc:183
static number nrAdd(number a, number b, const coeffs r)
Definition: shortfl.cc:94
static number nrNeg(number c, const coeffs r)
Definition: shortfl.cc:210
static BOOLEAN nrEqual(number a, number b, const coeffs r)
Definition: shortfl.cc:224
static void nrWrite(number a, const coeffs r)
Definition: shortfl.cc:232
static char * nrCoeffString(const coeffs r)
Definition: shortfl.cc:648
static const char * nrRead(const char *s, number *a, const coeffs r)
Definition: shortfl.cc:299
static BOOLEAN nrIsZero(number a, const coeffs r)
Definition: shortfl.cc:158
static number nrInit(long i, const coeffs r)
Definition: shortfl.cc:70
static BOOLEAN nrGreater(number a, number b, const coeffs r)
Definition: shortfl.cc:217
static BOOLEAN nrIsMOne(number a, const coeffs r)
Definition: shortfl.cc:174
static BOOLEAN nrIsOne(number a, const coeffs r)
Definition: shortfl.cc:165
static long nrInt(number &n, const coeffs r)
Definition: shortfl.cc:81
static BOOLEAN nrGreaterZero(number k, const coeffs r)
Definition: shortfl.cc:53