Functions
shortfl.h File Reference
#include <misc/auxiliary.h>

Go to the source code of this file.

Functions

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

Function Documentation

◆ nrFloat()

float nrFloat ( number  n)

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

Definition at line 75 of file shortfl.cc.

76 {
77  return nf(n).F();
78 }
Definition: gnumpfl.cc:27
float F() const
Definition: gnumpfl.cc:33

◆ nrInitChar()

BOOLEAN nrInitChar ( coeffs  r,
void *   
)

Initialize r.

Definition at line 730 of file shortfl.cc.

731 {
732  assume( getCoeffType(n) == n_R );
733 
734  assume( p == NULL );
735 
736  n->is_field=TRUE;
737  n->is_domain=TRUE;
738  n->rep=n_rep_float;
739 
740  //n->cfKillChar = ndKillChar; /* dummy */
741  n->ch = 0;
742  n->cfCoeffString = nrCoeffString;
743 
744  n->cfInit = nrInit;
745  n->cfInt = nrInt;
746  n->cfAdd = nrAdd;
747  n->cfSub = nrSub;
748  n->cfMult = nrMult;
749  n->cfDiv = nrDiv;
750  n->cfExactDiv= nrDiv;
751  n->cfInpNeg = nrNeg;
752  n->cfInvers= nrInvers;
753  //n->cfCopy = ndCopy;
754  n->cfGreater = nrGreater;
755  n->cfEqual = nrEqual;
756  n->cfIsZero = nrIsZero;
757  n->cfIsOne = nrIsOne;
758  n->cfIsMOne = nrIsMOne;
759  n->cfGreaterZero = nrGreaterZero;
760  n->cfWriteLong = nrWrite;
761  n->cfRead = nrRead;
762  //n->cfPower = nrPower;
763  n->cfSetMap = nrSetMap;
764  n->cfCoeffWrite = nrCoeffWrite;
765 
766  /* nName= ndName; */
767  /*nSize = ndSize;*/
768 #ifdef LDEBUG
769  //n->cfDBTest=ndDBTest; // not yet implemented: nrDBTest;
770 #endif
771 
772  //n->nCoeffIsEqual = ndCoeffIsEqual;
773 
774  n->float_len = SHORT_REAL_LENGTH;
775  n->float_len2 = SHORT_REAL_LENGTH;
776 
777  // TODO: Any variables?
778  return FALSE;
779 }
BOOLEAN nrGreaterZero(number k, const coeffs r)
Definition: shortfl.cc:88
number nrMult(number a, number b, const coeffs r)
Definition: shortfl.cc:95
BOOLEAN nrEqual(number a, number b, const coeffs r)
Definition: shortfl.cc:271
#define SHORT_REAL_LENGTH
Definition: numbers.h:54
#define FALSE
Definition: auxiliary.h:94
number nrSub(number a, number b, const coeffs r)
Definition: shortfl.cc:173
return P p
Definition: myNF.cc:203
#define TRUE
Definition: auxiliary.h:98
number nrDiv(number a, number b, const coeffs r)
Definition: shortfl.cc:230
single prescision (6,6) real numbers
Definition: coeffs.h:32
const char * nrRead(const char *s, number *a, const coeffs r)
Definition: shortfl.cc:341
number nrAdd(number a, number b, const coeffs r)
Definition: shortfl.cc:141
void nrWrite(number a, const coeffs r)
Definition: shortfl.cc:279
#define assume(x)
Definition: mod2.h:394
BOOLEAN nrIsMOne(number a, const coeffs r)
Definition: shortfl.cc:221
number nrInvers(number c, const coeffs r)
Definition: shortfl.cc:244
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:694
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:425
number nrInit(long i, const coeffs r)
Definition: shortfl.cc:105
void nrCoeffWrite(const coeffs r, BOOLEAN)
Definition: shortfl.cc:81
#define NULL
Definition: omList.c:10
BOOLEAN nrIsOne(number a, const coeffs r)
Definition: shortfl.cc:212
static char * nrCoeffString(const coeffs r)
Definition: shortfl.cc:725
number nrNeg(number c, const coeffs r)
Definition: shortfl.cc:257
long nrInt(number &n, const coeffs r)
Definition: shortfl.cc:116
BOOLEAN nrIsZero(number a, const coeffs r)
Definition: shortfl.cc:205
BOOLEAN nrGreater(number a, number b, const coeffs r)
Definition: shortfl.cc:264
(float), see shortfl.h
Definition: coeffs.h:116