Commit cd5e3450 authored by Julien Puydt's avatar Julien Puydt

New upstream version 2.9.0

parent acea33e8

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

#! /bin/sh
wget http://mpir.org/mpir-2.7.0.tar.bz2
tar -xf mpir-2.7.0.tar.bz2
cd mpir-2.7.0
./configure --enable-gmpcompat --prefix=$HOME/deps --disable-static
make -j4 > /dev/null 2>&1
make install
cd ..
wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
tar -xf mpfr-3.1.4.tar.bz2
cd mpfr-3.1.4
./configure --with-gmp=$HOME/deps --prefix=$HOME/deps --disable-static
make -j4 > /dev/null 2>&1
make install
cd ..
wget https://github.com/wbhart/flint2/archive/trunk.tar.gz
tar -xf trunk.tar.gz
cd flint2-trunk
./configure --with-gmp=$HOME/deps --with-mpfr=$HOME/deps --prefix=$HOME/deps --disable-static
make -j4 > /dev/null 2>&1
make install
cd ..
Makefile
build/*
libarb.so*
libarb.a
doc/build/*
*.ppm
language: c
sudo: false
addons:
apt:
packages:
- texinfo
os:
- osx
- linux
osx_image: xcode7
compiler:
- gcc
- clang
script:
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && [[ "${CC}" == "gcc" ]]; then
brew install gcc48;
export CC=gcc-4.8;
export CXX=g++-4.8;
fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
export ARB_TEST_MULTIPLIER=0.1;
fi
- ./.build_dependencies
- ./configure --with-mpir=$HOME/deps --with-mpfr=$HOME/deps --with-flint=$HOME/deps --prefix=$HOME/deps
- make -j4
- make install
- make check
cmake_minimum_required(VERSION 2.8.12)
project(arb C)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (Debug, Release)" FORCE)
endif ()
set (BUILD_SHARED_LIBS yes CACHE BOOL "Build shared library or not")
set (BUILD_TESTS no CACHE BOOL "Build tests or not")
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR
CMAKE_BUILD_TYPE STREQUAL "Release"))
message("${CMAKE_BUILD_TYPE}")
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of: Debug, Release (current value: '${CMAKE_BUILD_TYPE}')")
endif ()
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set (PLATFORM "x64")
else ()
set (PLATFORM "Win32")
endif()
if (BUILD_SHARED_LIBS)
set (LIBRARY_TYPE dll)
else ()
set (LIBRARY_TYPE lib)
endif()
set (MSVC_USE_MT yes CACHE BOOL "Use MT flags when compiling in MSVC")
set (MSVC_WARNING_LEVEL 1 CACHE STRING "MSVC warning level")
if (MSVC)
if (MSVC_USE_MT)
foreach(CompilerFlag CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE)
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach()
endif()
foreach(CompilerFlag CMAKE_C_FLAGS)
set(${CompilerFlag} "${${CompilerFlag}} /W${MSVC_WARNING_LEVEL} /DHAVE_TLS=1 /DFLINT_REENTRANT=0")
endforeach()
foreach(CompilerFlag CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE)
if (BUILD_SHARED_LIBS)
set(${CompilerFlag} "${${CompilerFlag}} /DMSC_USE_DLL")
else ()
set(${CompilerFlag} "${${CompilerFlag}} /DPTW32_STATIC_LIB")
endif()
endforeach()
if ("${LIBRARY_TYPE}" STREQUAL "dll")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS yes)
endif()
endif()
set (DEPS mpir mpfr pthreads flint2)
set (mpir_lib gmp mpir)
set (mpfr_lib mpfr)
set (pthreads_lib pthreads pthread)
set (flint2_lib ${LIBRARY_TYPE}_flint flint)
set (mpir_header gmp.h)
set (mpfr_header mpfr.h)
set (pthreads_header pthread.h)
set (flint2_header flint/flint.h)
foreach (LIB ${DEPS})
string (TOUPPER ${LIB} LIB_UPPER)
find_library(${LIB_UPPER}_LIBRARY NAMES ${${LIB}_lib} HINTS ../${LIB}
PATH_SUFFIXES ${LIBRARY_TYPE}/${PLATFORM}/${CMAKE_BUILD_TYPE} NO_DEFAULT_PATH)
if (NOT ${LIB_UPPER}_LIBRARY)
message(FATAL_ERROR "${LIB} library not found.")
endif()
add_library(${LIB} UNKNOWN IMPORTED)
set_property(TARGET ${LIB} PROPERTY IMPORTED_LOCATION ${${LIB_UPPER}_LIBRARY})
message("${LIB} found in ${${LIB_UPPER}_LIBRARY}")
endforeach ()
foreach (LIB ${DEPS})
string(TOUPPER ${LIB} HEADER_PKG)
set (HEADER ${${LIB}_header})
find_path(${HEADER_PKG}_INCLUDE_DIR NAMES ${HEADER} HINTS ../${LIB}
PATH_SUFFIXES ${LIBRARY_TYPE}/${PLATFORM}/${CMAKE_BUILD_TYPE})
if (NOT ${HEADER_PKG}_INCLUDE_DIR)
message(FATAL_ERROR "${HEADER} header not found.")
endif()
message("${HEADER} found in ${${HEADER_PKG}_INCLUDE_DIR}")
set (DEP_INCLUDE_DIRS ${DEP_INCLUDE_DIRS} ${${HEADER_PKG}_INCLUDE_DIR})
endforeach ()
file(GLOB TEMP "*.h")
foreach (TEMP_H ${TEMP})
get_filename_component(FOLDER ${TEMP_H} NAME_WE)
set(FOLDERS ${FOLDERS} ${FOLDER})
endforeach()
foreach (FOLDER ${FOLDERS})
file(GLOB TEMP "${FOLDER}/*.c")
set(SRC ${SRC} ${TEMP})
endforeach ()
include_directories(BEFORE ${arb_SOURCE_DIR})
include_directories(BEFORE ${DEP_INCLUDE_DIRS})
add_library(arb ${SRC})
target_link_libraries(arb ${DEPS})
target_compile_definitions(arb PRIVATE "ARB_BUILD_DLL")
if(NOT MSVC)
target_link_libraries(arb m)
endif()
install(TARGETS arb
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
foreach (FOLDER ${FOLDERS})
set(HEADERS ${HEADERS} ${FOLDER}.h)
endforeach ()
install(FILES ${HEADERS} DESTINATION include)
if (BUILD_TESTS)
enable_testing()
foreach (FOLDER ${FOLDERS})
file(GLOB TEMP "${FOLDER}/test/*.c")
foreach (TEST_SOURCE ${TEMP})
get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE)
add_executable(${FOLDER}-${TEST_NAME} ${TEST_SOURCE})
target_link_libraries(${FOLDER}-${TEST_NAME} arb)
add_test(${FOLDER}-${TEST_NAME} ${FOLDER}-${TEST_NAME})
endforeach ()
endforeach ()
endif ()
This diff is collapsed.
......@@ -13,7 +13,8 @@ QUIET_AR = @echo ' ' AR ' ' $@;
AT=@
BUILD_DIRS = fmpr arf mag arb arb_mat arb_poly arb_calc acb acb_mat acb_poly \
acb_calc acb_hypgeom acb_modular fmprb bernoulli hypgeom fmpz_extras partitions \
acb_calc acb_hypgeom acb_modular dirichlet acb_dirichlet arb_hypgeom bernoulli hypgeom \
fmpz_extras bool_mat partitions dlog \
$(EXTRA_BUILD_DIRS)
TEMPLATE_DIRS =
......@@ -101,6 +102,7 @@ $(ARB_LIB): $(LOBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | b
$(LDCONFIG) -n "$(CURDIR)"; \
fi
ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME)"; \
ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME).$(ARB_MAJOR)"; \
libarb.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces
$(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h)), mkdir -p build/$(dir); BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) static || exit $$?;))
......
......@@ -3,10 +3,12 @@
Arb is a C library for arbitrary-precision interval arithmetic.
It has full support for both real and complex numbers.
The library is thread-safe, portable, and extensively tested.
Arb is free software distributed under the
GNU Lesser General Public License (LGPL), version 2.1 or later.
![arb logo](http://fredrikj.net/blog/2015/01/arb-2-5-0-released/arbtext.png)
Documentation: http://fredrikj.net/arb/
Documentation: http://arblib.org
Development updates: http://fredrikj.net/blog/
......@@ -15,6 +17,8 @@ Author: Fredrik Johansson <fredrik.johansson@gmail.com>
Bug reports, feature requests and other comments are welcome
in private communication, on the GitHub issue tracker, or on the FLINT mailing list <flint-devel@googlegroups.com>.
[![Build Status](https://travis-ci.org/fredrik-johansson/arb.svg?branch=master)](https://travis-ci.org/fredrik-johansson/arb)
## Code example
The following program evaluates `sin(pi + exp(-10000))`. Since the
......@@ -66,7 +70,7 @@ can rely on Arb's automatic error bound tracking to get an output
that is guaranteed to be accurate -- no error analysis
needs to be done by the user.
For several other example programs, see: http://fredrikj.net/arb/examples.html
For more example programs, see: http://arblib.org/examples.html
## General features
......@@ -90,7 +94,7 @@ rudimentary functionality for rigorous calculus based on AD
Arb can compute a wide range of transcendental and special functions,
including the gamma function, polygamma functions,
Riemann zeta and Hurwitz zeta function, polylogarithm,
Riemann zeta and Hurwitz zeta function, Dirichlet L-functions, polylogarithm,
error function, Gauss hypergeometric function 2F1, confluent
hypergeometric functions, Bessel functions, Airy functions,
Legendre functions and other orthogonal polynomials,
......@@ -123,12 +127,12 @@ the complex number `z = 5^(1/2) + 7^(1/2)i`, to a given
number of decimal digits (Arb 2.8-git and mpmath 0.19 on
an 1.90 GHz Intel i5-4300U, Mathematica 9.0 on a 3.07 GHz Intel Xeon X5675).
| Digits | Mathematica | mpmath | Arb |
| -------:|:------------|:-----------|:----------|
| 10 | 0.00066 | 0.00090 | 0.00011 |
| 100 | 0.0039 | 0.0017 | 0.00075 |
| 1000 | 0.23 | 1.5 | 0.019 |
| 10000 | 42.6 | 98 | 1.2 |
| Digits | Mathematica | mpmath | Arb |
| -------:|:------------|:-----------|:-----------|
| 10 | 0.00066 | 0.00065 | 0.000071 |
| 100 | 0.0039 | 0.0012 | 0.00048 |
| 1000 | 0.23 | 1.2 | 0.0093 |
| 10000 | 42.6 | 84 | 0.56 |
## Dependencies, installation, and interfaces
......@@ -136,16 +140,25 @@ Arb depends on FLINT (http://flintlib.org/), either
GMP (http://gmplib.org) or MPIR (http://mpir.org),
and MPFR (http://mpfr.org).
See http://fredrikj.net/arb/setup.html for instructions
See http://arblib.org/setup.html for instructions
on building and installing Arb directly from the source code.
Arb might also be available (or coming soon) as a package for
your Linux distribution.
SageMath <http://sagemath.org/> will include Arb as a standard package