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.

198 questions
130
votes
6 answers

How to install GCC piece by piece with GMP, MPFR, MPC, ELF, without shared libraries?

How do I install GCC (the GNU Compiler Collection) piece by piece, using the current version, using the correct versions of dependencies, not using a package manager (like yum, rpm, apt, dpkg), and not using shared libraries? Typical developers will…
joelparkerhenderson
  • 34,808
  • 19
  • 98
  • 119
105
votes
6 answers

Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+

I downloaded GCC 4.5 from http://www.netgull.com/gcc/releases/gcc-4.5.0/ but when I try to setup / build I am getting below error: Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1040> /x/home/prakash_satya/shared_scripts/bin/gcc/gcc-4.5.0/configure…
Programmer
  • 8,303
  • 23
  • 78
  • 162
20
votes
5 answers

dyld: Library not loaded: /usr/local/lib/libmpfr.4.dylib

When I run "make" on a project I get this error: dyld: Library not loaded: /usr/local/lib/libmpfr.4.dylib Referenced from: /Users/Petrov/Downloads/mips/bin/../libexec/gcc/mipsel-elf/4.8.1/cc1 Reason: image not found There is no libmpfr.4.dylib…
Elizabeth Haker
  • 301
  • 1
  • 2
  • 3
14
votes
6 answers

Cannot configure gcc - mpfr not found

I'm installing gcc 4.5.2 with mpc 0.8.2, mpfr 3.1.0, and gmp 5.0.2. I've copied each of the mpc, mpfr, and gmp directories into the gcc-4.5.2 directory (removing the version tags). GCC successfully configures. When I run make, however, I…
Robert Mason
  • 3,949
  • 3
  • 31
  • 44
11
votes
2 answers

Building GMP library with Visual Studio?

Is there an easy way to build the GMP (GNU Multiple Precision Arithmetic Library, http://gmplib.org) under Windows, using Visual Studio 2005? I tried to find information about building the library myself, but could not find anything that really…
ToastedSoul
  • 1,296
  • 1
  • 17
  • 27
8
votes
1 answer

How to install GNU MPFR library on pythonanywhere

I'm trying to install bigfloat and I am getting this message that seems to indicate I need the mpfr library first. How do I do this? The message: running build_ext building 'mpfr' extension creating build/temp.linux-x86_64-2.7…
vexgr1999
  • 81
  • 1
  • 4
8
votes
7 answers

GCC cant find GMP, MPFR and MPC libraries

I am trying to cross-compile GCC on Mac OS 10.5.7. I used this command to configure GCC after installing GMP, MPFR, and MPC: ../gcc-4.5.0/configure --target=$i586-elf --prefix=/usr/local/cross \ --disable-nls \ …
None
  • 3,875
  • 7
  • 43
  • 67
8
votes
0 answers

GMP & MPFR not found by cmake, but are installed

I'm trying to compile the plll library which require boost, GMP and MPFR on mac os X 10.11. I've installed boost, GMP and MPFR by homebrew, then i've launched cmake in a dir build in plll, but I get that error : By not providing "FindMPFR.cmake"…
user70925
  • 263
  • 2
  • 5
6
votes
2 answers

cannot open libmpfr.so.4 after update on ubuntu 18.04

Today I updated my laptop to Ubuntu 18.04. Now I try to run a program for my bachelor thesis, but it gives me the following error message: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or…
ironmaya
  • 61
  • 1
  • 1
  • 4
6
votes
1 answer

Can I use a `mpfr_t` as both input and output argument?

The question is very simple and direct, but I could not find an answer on the documentation. If I have mpfr_t a, b; Can I do something like mpfr_add(a, a, b, rnd); This would compute the sum of a and b and store the result on a. I don't know if…
Spiros
  • 2,156
  • 2
  • 23
  • 42
6
votes
3 answers

Compiling GMP/MPFR with Emscripten

Alright, this has been driving me insane. I've been trying this for at least a month, and no where on the internet is helping. I followed the steps of this. Not even the example works when I do these steps, because when I do it, I get this. bitcode…
Flarp
  • 139
  • 1
  • 10
6
votes
2 answers

different behaviour or sqrt when compiled with 64 or 32 bits

I'm using sqrt() function from math library, when I build for 64 bit using -m64 I'm getting correct result but when I build for 32 bit I have very inconsistent behaviour. For example on 64bit double dx = 0x1.fffffffffffffp+1023; sqrt(dx); // =>…
kanna
  • 1,412
  • 1
  • 15
  • 33
5
votes
2 answers

How to check the version of GMP, MPFR and CamlIDL?

My question is simple... How could I check the version of GMP installed on my machine? What about MPFR? And What about CamlIDL? Thank you very much
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
5
votes
1 answer

Using Rmpfr to round with precision in R

I'm trying to use the Rmpfr library with the round() function to apply the round half to even rule and achieve correct results, without errors due the finite precision of float point values, as described here. So far, this is what I've…
art
  • 181
  • 1
  • 9
5
votes
2 answers

I need to calculate Stirling's approximation very fast

I'm writing a small library for statistical sampling which needs to run as fast as possible. In profiling I discovered that around 40% of the time taken in the function is spent computing Stirling's approximation for the logarithm of the factorial.…
pg1989
  • 1,010
  • 6
  • 13
1
2 3
13 14