Questions tagged [mpfr]

The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.

The MPFR library is built on the GNU Multi-Precision Arithmetic Library. It is licensed under the GNU LGPL v3 (or later versions).

The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.

The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit significand).

Both GMP and MPFR (and also MPC) are prerequisites when building the GNU Compiler Collection.

178 questions
0
votes
2 answers

Error while install gcc49 in Ubuntu by using linuxbrew

I want to install the latest gcc49 in a Ubuntu Linux, and I am familiar with Homebrew in Mac, so I would like to use the Linux version of it, i.e., Linuxbrew. So I installed Linuxbrew and typed $ brew install gcc49 The dependencies gmp4, mpfr2 and…
Li Dong
  • 1,028
  • 2
  • 16
  • 27
0
votes
1 answer

configure error for mpfr-3.1.2 missing libgmp but is is in the /usr/lib

I am on step 6.15.1 on linux from scratch. When I am trying to configure the mpfr I am getting an error ... checking for __gmpz_init in -lgmp... no configure: error: libgmp not found or uses a different ABI (including static vs shared). Please read…
penright
  • 133
  • 4
  • 12
0
votes
0 answers

Re-using mpfr_t in long chain of arithmetic operations

I'm writing a function which uses mpfr_t as its main data type. In this function, there will be long chains of operations which need temporary variables to store intermediate results. I'd like to minimize the number of temporary variables I'll need,…
pg1989
  • 980
  • 5
  • 12
0
votes
1 answer

How to deploy a portable gcc with cloog?

I'm trying to build a portable version of gcc 4.8.2. (for only C/C++ languages) The end result is have gcc installed into a specific application directory, eg, /opt/gcc-4.8.2 so that I can copy that directory from one computer to another (all…
Darren Smith
  • 1,736
  • 12
  • 13
0
votes
1 answer

where can I find a Visual studio 2008 project build file for MPFR? or how to create such build file myself?

I a new C++ user and have only Visual studio 2008 installed. It seems from this link: Brian Gladman's Home Page There is already "Visual Studio 2010 project build files for building MPFR", which is only for VC2010 and my VS cannot open…
LCFactorization
  • 1,372
  • 1
  • 20
  • 32
0
votes
0 answers

Is it possible to simplify value creation/usage in MPFR?

Suppose that I want to use MPFR to compute pi; I have the following code, which works: mpfr_t PI; mpfr_t one; mpfr_init(PI); mpfr_init(one); mpfr_set_d(one, 1, MPFR_RNDN); mpfr_asin(PI, one, MPFR_RNDN); mpfr_mul_d(PI, PI, 2, MPFR_RNDN); This is…
Eric Tressler
  • 376
  • 1
  • 10
0
votes
1 answer

An error when installing MPFR (3.1.0)

I am trying to install MPFR (3.1.0) with the instructions from this link (part 3) and I get the following error: checking for gmp internal files... configure: error: header files gmp-impl.h and longlong.h not found I have already installed gmp…
Belgi
  • 13,002
  • 21
  • 50
  • 63
0
votes
2 answers

long long int on 32-bit Linux vs 64-bit Linux and MPFR

How exactly does a 32-bit Linux system handle long long int compared to 64-bit Linux? On my 32 bit system I use a C++ wrapper for the MPFR data type; this wrapper has a constructor defined for long int but not long long int. Nevertheless, on the…
fpghost
  • 2,462
  • 2
  • 26
  • 46
0
votes
1 answer

gcc 4.7.1 build ends with undefined reference

I am getting a fortran/arith.o: In function gfc_mpfr_to_mpz(__mpz_struct*, __mpfr_struct*, locus*)': arith.c:(.text+0x1169): undefined reference tompfr_get_z_2exp' from gcc 4.7.1 build process. I am following gcc-wiki However, I have made a…
Umut Tabak
  • 1,770
  • 3
  • 24
  • 39
0
votes
2 answers

what is precision?

I haven't been able to find an answer on Wikipedia (or SO) or in the documentation for this very simple question. How is the precision of a floating point number represented by an integer? I am using the wrapper MPFRC++ over the arbitrary precision…
cmo
  • 2,912
  • 3
  • 29
  • 56
-2
votes
1 answer

Changed computer now can not compile

I have encountered a problem which I do not know where to begin with. I developed code on my laptop and it works fine. I moved to another computer and now during compilation I get, error: unknown type name 'mpfr_exp_t' The mpfr library is…
-2
votes
1 answer

C++ type for floating numbers with high precision

We are having heavy issues with data types. I have huge problem with data types in c++. I have to handle numbers with 100 digits. I've been trying to use mpfr real, but the compiler crashs always. #include #include #include…
Tamwyn
  • 147
  • 2
  • 13
-4
votes
1 answer

How to compile GCC cross-compiler?

I am trying to compile GCC for i586-elf but every time I run the 'configure' file with this command: ./configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable languages=c --without-headers --with-gmp=$PREFIX…
1 2 3
11
12