Installing MPC on Mac OS X

About MPC

MPC ( is C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. According to the webpage of MPC, it carries on the idea of the IEEE-745 standard for fixed precision real floating point numbers to complex numbers, providing well-defined semantics for every operation. The design goal of this library is fast operation with high precision.

Installing MPC on Mac OS X

To install MPC on Mac OS X, please use homebrew. You have to install homebrew on Mac before working on MPC. (To know how to install homebrew, please visit this page.) In this article, Mac OS X Mavericks 10.9.3 is used.

$ brew install mpc

To check whether the installation of MPC is succeed or not, please examine the information of the installed MPC and the contents of the directories. If MPC is successfully installed, the information and contents appear as applying the command and examining the directories.

  • Apply the command line below
    $ brew info libmpc
    libmpc: stable 1.0.2 (bottled)
    /usr/local/Cellar/libmpc/1.0.2 (10 files, 384K) *
      Poured from bottle
    ==> Dependencies
    Required: gmp レ, mpfr レ
  • Check the contents of directories of /usr/local/Cellar/libmpc/1.0.2/lib/ and /usr/local/lib/libmpc*
    $ ls -al /usr/local/Cellar/libmpc/1.0.2/lib/
    total 512
    drwxr-xr-x   5 otsuka  admin     170  5 12 22:04 .
    drwxr-xr-x  11 otsuka  admin     374  5 20 17:50 ..
    -r--r--r--   1 otsuka  admin   91440  5 20 17:50 libmpc.3.dylib
    -r--r--r--   1 otsuka  admin  161616  5 12 22:04 libmpc.a
    lrwxr-xr-x   1 otsuka  admin      14  5 12 22:04 libmpc.dylib -> libmpc.3.dylib
  • Check the contents of directories of /usr/local/lib/libmpc*
    $ ls -al /usr/local/lib/libmpc*
    lrwxr-xr-x  1 otsuka  admin  41  5 20 17:50 /usr/local/lib/libmpc.3.dylib -> ../Cellar/libmpc/1.0.2/lib/libmpc.3.dylib
    lrwxr-xr-x  1 otsuka  admin  35  5 20 17:50 /usr/local/lib/libmpc.a -> ../Cellar/libmpc/1.0.2/lib/libmpc.a
    lrwxr-xr-x  1 otsuka  admin  39  5 20 17:50 /usr/local/lib/libmpc.dylib -> ../Cellar/libmpc/1.0.2/lib/libmpc.dylib

Revision History

  • 2015/01/06 This article is initially uploaded

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2015-01-06 (Tue) 05:14:16 (1053d)