libqalculate-5.0.0
Classes | Macros | Enumerations | Functions
Number.h File Reference
#include <libqalculate/includes.h>
#include <gmp.h>
#include <mpfr.h>

Classes

class  Number
 A number. More...
 

Macros

#define EQUALS_PRECISION_DEFAULT   -1
 
#define EQUALS_PRECISION_LOWEST   -2
 
#define EQUALS_PRECISION_HIGHEST   -3
 

Enumerations

enum  NumberType { NUMBER_TYPE_RATIONAL , NUMBER_TYPE_FLOAT , NUMBER_TYPE_PLUS_INFINITY , NUMBER_TYPE_MINUS_INFINITY }
 
enum  IntegerType {
  INTEGER_TYPE_NONE , INTEGER_TYPE_SINT , INTEGER_TYPE_UINT , INTEGER_TYPE_ULONG ,
  INTEGER_TYPE_SLONG , INTEGER_TYPE_SIZE
}
 

Functions

std::ostream & operator<< (std::ostream &os, const Number &)
 
bool testComplexZero (const Number *this_nr, const Number *i_nr)
 
unsigned int standard_expbits (unsigned int bits)
 
int from_float (Number &nr, std::string sbin, unsigned int bits, unsigned int expbits=0)
 
std::string to_float (Number nr, unsigned int bits, unsigned int expbits=0, bool *approx=NULL)
 
int from_float (Number &nr, std::string sbin, unsigned int bits, unsigned int expbits, unsigned int sgnpos)
 
std::string to_float (Number nr, unsigned int bits, unsigned int expbits, unsigned int sgnpos, bool *approx=NULL)