gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 303e6e2 048/113: Incorporated recent work, mi


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 303e6e2 048/113: Incorporated recent work, minor conflict corrected
Date: Fri, 16 Apr 2021 10:33:42 -0400 (EDT)

branch: master
commit 303e6e2e9883399d3750a31470f6ebddc11825a2
Merge: d7e0037 985ea7d
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Incorporated recent work, minor conflict corrected
    
    The minor conflict in `lib/match.c' was corrected by completely removing
    the part in `master' and only keeping the part in this branch.
---
 .mailmap                                           |   6 +-
 NEWS                                               |  12 +-
 THANKS                                             |  17 +-
 bin/arithmetic/arithmetic.c                        |   4 +-
 configure.ac                                       | 302 ++-----
 doc/Makefile.am                                    |  15 +-
 doc/announce-acknowledge.txt                       |  13 +-
 doc/forwebpage                                     |  18 +-
 doc/{gnuastro-top.html => gnuastro.en.html}        | 150 ++--
 doc/gnuastro.fr.html                               | 666 +++++++--------
 doc/gnuastro.texi                                  | 666 ++++++++-------
 doc/gnuastro.translist                             |  12 +
 doc/release-checklist.txt                          |  37 +-
 lib/Makefile.am                                    |  45 +-
 .../arithmetic-onlyint.h => arithmetic-and.c}      |  34 +-
 lib/arithmetic-binary.c                            | 492 -----------
 lib/arithmetic-bitand.c                            |  58 ++
 lib/arithmetic-bitlsh.c                            |  58 ++
 lib/arithmetic-bitor.c                             |  58 ++
 lib/arithmetic-bitrsh.c                            |  58 ++
 lib/arithmetic-bitxor.c                            |  58 ++
 lib/arithmetic-divide.c                            |  53 ++
 .../arithmetic-onlyint.h => arithmetic-eq.c}       |  34 +-
 .../arithmetic-onlyint.h => arithmetic-ge.c}       |  34 +-
 .../arithmetic-onlyint.h => arithmetic-gt.c}       |  34 +-
 .../arithmetic-onlyint.h => arithmetic-le.c}       |  34 +-
 .../arithmetic-onlyint.h => arithmetic-lt.c}       |  34 +-
 lib/arithmetic-minus.c                             |  53 ++
 lib/arithmetic-modulo.c                            |  58 ++
 lib/arithmetic-multiply.c                          |  53 ++
 .../arithmetic-onlyint.h => arithmetic-ne.c}       |  34 +-
 lib/arithmetic-onlyint.c                           | 492 -----------
 .../arithmetic-onlyint.h => arithmetic-or.c}       |  34 +-
 lib/arithmetic-plus.c                              |  53 ++
 lib/arithmetic.c                                   | 914 ++++++++++-----------
 .../{arithmetic-onlyint.h => arithmetic-and.h}     |  14 +-
 lib/gnuastro-internal/arithmetic-binary.h          | 251 +++++-
 .../{arithmetic-binary.h => arithmetic-bitand.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-bitlsh.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-bitor.h}    |  11 +-
 .../{arithmetic-binary.h => arithmetic-bitrsh.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-bitxor.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-divide.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-eq.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-ge.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-gt.h}       |  11 +-
 lib/gnuastro-internal/arithmetic-internal.h        |   4 +-
 .../{arithmetic-binary.h => arithmetic-le.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-lt.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-minus.h}    |  11 +-
 .../{arithmetic-binary.h => arithmetic-modulo.h}   |  11 +-
 .../{arithmetic-binary.h => arithmetic-multiply.h} |  11 +-
 .../{arithmetic-binary.h => arithmetic-ne.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-or.h}       |  11 +-
 .../{arithmetic-binary.h => arithmetic-plus.h}     |  11 +-
 lib/gnuastro/arithmetic.h                          |   2 +-
 lib/match.c                                        |   1 +
 lib/options.c                                      |  29 +-
 tests/Makefile.am                                  |  10 +-
 tests/lib/{versioncpp.cpp => versioncxx.cpp}       |   0
 tests/lib/{versioncpp.sh => versioncxx.sh}         |   2 +-
 61 files changed, 2475 insertions(+), 2718 deletions(-)

diff --git a/.mailmap b/.mailmap
index c47aba3..f8f1c22 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,3 +1,5 @@
 Boud Roukema <boud@cosmo.torun.pl>
-<akhlaghi@gnu.org> <makhlaghi@gmail.com>
-Lucas MacQuarrie <macquarrielucas@gmail.com>
\ No newline at end of file
+Mohammad Akhlaghi <mohammad@akhlaghi.org>
+<mohammad@akhlaghi.org> <akhlaghi@gnu.org>
+Lucas MacQuarrie <macquarrielucas@gmail.com>
+<mohammad@akhlaghi.org> <makhlaghi@gmail.com>
\ No newline at end of file
diff --git a/NEWS b/NEWS
index e674196..118c3a7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 GNU Astronomy Utilities NEWS                          -*- outline -*-
 
 
-* Noteworthy changes in release 0.4.XXX (library 3.0.0) (YYYY-MM-DD) [stable]
+* Noteworthy changes in release 0.5 (library 3.0.0) (2017-12-22) [stable]
 
 ** New features
 
@@ -13,8 +13,8 @@ GNU Astronomy Utilities NEWS                          -*- 
outline -*-
   New Program and library: Match is a new program that will match two given
   inputs (currently catalogs). Its output is the re-arranged inputs with
   the same number of rows/records such that all the rows match. The main
-  work is also done with the new `gal_match_catalog' library function which
-  can also be used in other contexts.
+  work is also done with the new low-level `gal_match_catalog' library
+  function which can also be used in more generic contexts.
 
   All programs: a value of `0' to the `--numthreads' option will use the
   number of threads available to the system at run time.
@@ -107,6 +107,12 @@ GNU Astronomy Utilities NEWS                          -*- 
outline -*-
 
 ** Removed features
 
+  Installation: The `--enable-bin-op-*' configuration options that were
+  introduced in Gnuastro 0.3 have been removed. By managing the arithmetic
+  functions in a better manner (a separate source file for each operator),
+  compilation for all types (when done in parallel) takes about the same
+  time as it took with the default (only four) types until now.
+
   MakeCatalog: `--zeropoint' option doesn't have a short option name any
   more. Previously it was `-z' which was confusing because `-x' and `-y'
   were used to refer to image coordinate positions.
diff --git a/THANKS b/THANKS
index b094d91..1162539 100644
--- a/THANKS
+++ b/THANKS
@@ -16,14 +16,16 @@ authors of Gnuastro. We hereby gratefully acknowledge their 
help and
 support in Gnuastro. The list is ordered alphabetically (by family name).
 
     Marjan Akbari                        mrjakbari@gmail.com
-    Karl Berry                           karl@gnu.org
     Roland Bacon                         roland.bacon@univ-lyon1.fr
+    Karl Berry                           karl@gnu.org
     Leindert Boogaard                    boogaard@strw.leidenuniv.nl
     Nicolas Bouché                       nicolas.bouche@irap.omp.eu
     Fernando Buitrago                    fbuitrago@oal.ul.pt
     Adrian Bunk                          bunk@debian.org
     Rosa Calvi                           rcalvi@iac.es
+    Benjamin Clement                     benjamin.clement@univ-lyon1.fr
     Antonio Diaz Diaz                    antonio@gnu.org
+    Thérèse Godefroy                     godef.th@free.fr
     Madusha Gunawardhana                 gunawardhana@strw.leidenuniv.nl
     Stephen Hamer                        stephen.hamer@univ-lyon1.fr
     Takashi Ichikawa                     ichikawa@astr.tohoku.ac.jp
@@ -36,17 +38,28 @@ support in Gnuastro. The list is ordered alphabetically (by 
family name).
     Alan Lefor                           alefor@astr.tohoku.ac.jp
     Guillaume Mahler                     guillaume.mahler@univ-lyon1.fr
     Francesco Montanari                  francesco.montanari@openmailbox.org
-    William Pence                        William.Pence@nasa.gov
+    William Pence                        william.pence@nasa.gov
+    Bob Proulx                           bob@proulx.com
     Yahya Sefidbakht                     y.sefidbakht@gmail.com
     Alejandro Serrano Borlaff            asborlaff@ucm.es
     Lee Spitler                          lee.spitler@mq.edu.au
     Richard Stallman                     rms@gnu.org
     Ole Streicher                        olebole@debian.org
+    Alfred M. Szmidt                     ams@gnu.org
     Ignacio Trujillo                     trujillo@iac.es
     David Valls-Gabaud                   david.valls-gabaud@obspm.fr
     Christopher Willmer                  cnaw@as.arizona.edu
 
 
+Teams
+-----
+
+The members of the following teams also provided great help and support.
+
+    GNU French Translation Team:
+        https://savannah.gnu.org/projects/www-fr
+
+
 Institutions
 ------------
 
diff --git a/bin/arithmetic/arithmetic.c b/bin/arithmetic/arithmetic.c
index 36ed627..73375f5 100644
--- a/bin/arithmetic/arithmetic.c
+++ b/bin/arithmetic/arithmetic.c
@@ -447,8 +447,8 @@ reversepolish(struct arithmeticparams *p)
   unsigned int numop, i;
   gal_list_str_t *token;
   gal_data_t *d1=NULL, *d2=NULL, *d3=NULL;
-  unsigned char flags = ( GAL_ARITHMETIC_INPLACE | GAL_ARITHMETIC_FREE
-                          | GAL_ARITHMETIC_NUMOK );
+  int flags = ( GAL_ARITHMETIC_INPLACE | GAL_ARITHMETIC_FREE
+                | GAL_ARITHMETIC_NUMOK );
 
 
   /* Prepare the processing: */
diff --git a/configure.ac b/configure.ac
index 455d9eb..35c9ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,15 +60,9 @@ AC_SUBST(GAL_LT_VERSION)
 
 
 
-# By default we assume no warnings
-anywarnings=no
-
-
-
-
-
 # Checks for programs.
 : ${CFLAGS=""}
+: ${CXXFLAGS=""}
 AC_PROG_CC
 AC_PROG_CXX
 gl_EARLY
@@ -95,6 +89,7 @@ AC_DEFINE([IN_GNUASTRO_BUILD], [1], [In building, not usage])
 
 # Generic compiler flags for all sub-directories.
 CFLAGS="-Wall -O3 $CFLAGS"
+CXXFLAGS="-Wall -O3 $CXXFLAGS"
 LDFLAGS="-L\$(top_builddir)/lib $LDFLAGS"
 CPPFLAGS="-I\$(top_srcdir)/lib $CPPFLAGS"
 
@@ -103,11 +98,12 @@ CPPFLAGS="-I\$(top_srcdir)/lib $CPPFLAGS"
 
 
 # Check for pthreads and add the appropriate compilation flags. AX_PTHREAD
-# comes from the GNU Autoconf Archive's ax_pthread.m4.
+# comes from the GNU Autoconf Archive's ax_pthread.m4, see there for the
+# documentation. Note that
 AX_PTHREAD([],[AC_MSG_ERROR([AC_PACKAGE_NAME Needs POSIX Threads (pthread)])])
-CLIBS="$PTHREAD_LIBS $LIBS"
+CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
+LIBS="$PTHREAD_LIBS $LIBS"
 CC="$PTHREAD_CC"
 
 
@@ -115,20 +111,22 @@ CC="$PTHREAD_CC"
 
 
 # See if the C++ compiler understands `-Qunused-arguments'. AX_PTHREAD adds
-# this option to LDFLAGS when the C compiler knows this option. But as
-# reported in bug #52490, it can happen that at the same time, the C++
-# compiler doesn't recognize it.
-cpp_Qunused_arguments_problem=no
-for flg in $LDFLAGS; do
+# puts this option in `PTHREAD_CFLAGS' when the C compiler knows this
+# option. We then pass it to CFLAGS and CXXFLAGS above. But as reported in
+# bug #52490, it can happen that sometimes, the C++ compiler doesn't
+# recognize it. So we need to do a separate check for C++.
+cxxflags_tmp=
+for flg in $CXXFLAGS; do
   AS_IF([test "$flg" = \-Qunused-arguments],
         [ AC_LANG(C++)
           AX_CHECK_COMPILE_FLAG([-Qunused-arguments],
-                                [cpp_Qunused_arguments_problem=no],
-                                [cpp_Qunused_arguments_problem=yes])
-          AC_LANG(C) ])
+                                [cxx_Qunused_arguments=yes;
+                                 cxxflags_tmp="$cxxflags_tmp $flg"],
+                                [cxx_Qunused_arguments=no])
+          AC_LANG(C) ],
+        [ cxxflags_tmp="$cxxflags_tmp $flg"])
 done
-AM_CONDITIONAL([COND_NO_CPP_QUNUSED_ARGUMENTS_PROBLEM],
-               [test "x$cpp_Qunused_arguments_problem" = "xno"])
+CXXFLAGS="$cxxflags_tmp"
 
 
 
@@ -155,6 +153,55 @@ AC_DEFINE_UNQUOTED([GAL_CONFIG_SIZEOF_LONG], 
[$ac_cv_sizeof_long],
 
 
 
+# By default we assume no warnings
+anywarnings=no
+
+
+
+
+
+# Remove any occurance of the current directory `./', `.', or the full
+# address of the current directory in PATH. The main problem is the
+# `libtool' executable which Gnuastro builds internally in the top build
+# directory. However, we also need to know if the system has libtool or
+# not.
+AC_MSG_CHECKING(if PATH contains current directory)
+oldPATH=$PATH
+currpwd=$(pwd)
+
+# The first call to SED will remove any occurance of the current directory:
+# `./', `.', or the full address.
+#
+#    NOTE 1: We cannot simply remove all `.'s, because hidden directories
+#            (like the `~/.local' that is suggested for local
+#            installations) will also be altered.
+#
+#    NOTE 2: An empty string in the list of strings (separated by `:')
+#            means the current directory. This includes cases like: `::',
+#            or a leading and trailing `:'. So after all the removals of
+#            the current directory, we will remove all such cases.
+#
+#    NOTE 3: The SED separator can be any character immediately after `s',
+#            it doesn't just have to be the commonly used `/'. Since `$pwd'
+#            will possibly contain many `/'s, it is much more easier to use
+#            a differen separator (`|' in this call to SED).
+PATH=$(AS_ECHO([$PATH]) | $SED -e 's|'"$currpwd"'||g' \
+                               -e 's|\.\.*//*||g'     \
+                               -e 's|:\.\.*:|:|g'     \
+                               -e 's|\.*$||'          \
+                               -e 's|^\.*||'          \
+                               -e 's|::*|:|g'         \
+                               -e 's|^:||'            \
+                               -e 's|:$||' )
+AS_IF([test $oldPATH = $PATH],
+      [ path_warning=no ],
+      [ path_warning=yes; anywarnings=yes ])
+AC_MSG_RESULT( $path_warning )
+
+
+
+
+
 # Search for necessary libraries. After each library is found,
 # AC_SEARCH_LIBS adds the -lLIBRARY flag to the LIBS variable which is then
 # given to all the Makefiles. Each new flag is added to the left of the old
@@ -183,12 +230,15 @@ AC_SEARCH_LIBS([wcspih], [wcs], [],
 # These are secondary tests for more fine-grained control in libraries that
 # have already been checked. We don't need to add them to the LIBS
 # variable, so we are using AC_CHECK_LIB for these tests.
+
+# If the WCS library has the `wcslib_version' function.
 AC_CHECK_LIB([wcs], [wcslib_version], [has_wcslib_version=1],
              [has_wcslib_version=0], [-lcfitsio -lm])
 AC_DEFINE_UNQUOTED([GAL_CONFIG_HAVE_WCSLIB_VERSION], [$has_wcslib_version],
                    [WCSLIB comes with wcslib_version])
 AC_SUBST(HAVE_WCSLIB_VERSION, [$has_wcslib_version])
 
+# If the pthreads library has `pthread_barrier_wait'.
 AC_CHECK_LIB([pthread], [pthread_barrier_wait], [has_pthread_barrier=1],
              [has_pthread_barrier=0])
 AC_DEFINE_UNQUOTED([GAL_CONFIG_HAVE_PTHREAD_BARRIER], [$has_pthread_barrier],
@@ -253,9 +303,11 @@ AC_SUBST(HAVE_LIBGIT2, [$has_libgit2])
 
 
 
-# Check the libtool executable: needed by BuildProgram.
-AC_CHECK_PROG(has_libtool, libtool, [yes], [no], ,
-              ./libtool .//libtool $ac_pwd/libtool)
+# Check the libtool executable on the system. Note that Gnuastro also ships
+# with a version of Libtool. We don't want Gnuastro's Libtool, here we want
+# to see if the system has libtool independent of Gnuastro so BuildProgram
+# can use it later.
+AC_CHECK_PROG(has_libtool, libtool, [yes], [no])
 
 # If Libtool is present, make sure it is GNU Libtool
 AS_IF([test "x$has_libtool" = "xyes"],
@@ -327,194 +379,6 @@ AC_DEFINE_UNQUOTED([CONF_SHOWFMT], [" %-20s"],
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# The native types for binary arithmetic operations, see the manual for a
-# detailed discussion. The initial list of which types to compile can be
-# determined with the `--enable-bin-op-alltypes' option. If they have a
-# value of 1, they will be compiled. It is possible to disable a previously
-# compiled type with with `--disable-bin-op-TYPENAME', or
-# `--enable-bin-op-TYPENAME=no'.
-binop_alltypes=0
-AC_ARG_ENABLE([bin-op-alltypes],
-              [AS_HELP_STRING([--enable-bin-op-alltypes],
-                    [Allow native binary operations for all types.])],
-             [AS_IF([test "x$enable_bin_op_alltypes" != xno],
-                     [binop_alltypes=1], [binop_alltypes=0])], [])
-AS_IF([test "x$binop_alltypes" != x0],
-      [binop_uint8=1
-       binop_int8=1
-       binop_uint16=1
-       binop_int16=1
-       binop_uint32=1
-       binop_int32=1
-       binop_uint64=1
-       binop_int64=1
-       binop_float32=1
-       binop_float64=1],
-      [binop_uint8=1
-       binop_int8=0
-       binop_uint16=0
-       binop_int16=0
-       binop_uint32=0
-       binop_int32=0
-       binop_uint64=1
-       binop_int64=1
-       binop_float32=1
-       binop_float64=1] )
-
-AC_MSG_CHECKING(compilation of 8-bit unsigned int binary operators)
-AC_ARG_ENABLE([bin-op-uint8],
-              [AS_HELP_STRING([--enable-bin-op-uint8],
-                    [Native binary operators on unsigned 8-bit int.])],
-             [AS_IF([test "x$enable_bin_op_uint8" != xno],
-                     [binop_uint8=1], [binop_uint8=0])], [])
-AS_IF([test "x$binop_uint8" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_UINT8], [$binop_uint8],
-                   [Native binary operations on unsigned 8-bit int.])
-AC_SUBST(HAVE_BIN_OP_UINT8, [$binop_uint8])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 8-bit signed int binary operators)
-AC_ARG_ENABLE([bin-op-int8],
-              [AS_HELP_STRING([--enable-bin-op-int8],
-                    [Native binary operations on int8 data.])],
-             [AS_IF([test "x$enable_bin_op_int8" != xno],
-                     [binop_int8=1], [binop_int8=0])], [])
-AS_IF([test "x$binop_int8" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_INT8], [$binop_int8],
-                   [Native binary operations on int8 data.])
-AC_SUBST(HAVE_BIN_OP_INT8, [$binop_int8])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 16-bit unsigned int binary operators)
-AC_ARG_ENABLE([bin-op-uint16],
-              [AS_HELP_STRING([--enable-bin-op-uint16],
-                    [Native binary operators on unsigned short data.])],
-             [AS_IF([test "x$enable_bin_op_uint16" != xno],
-                     [binop_uint16=1], [binop_uint16=0])], [])
-AS_IF([test "x$binop_uint16" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_UINT16], [$binop_uint16],
-                   [Native binary operations on unsigned short data.])
-AC_SUBST(HAVE_BIN_OP_UINT16, [$binop_uint16])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 16-bit signed int binary operators)
-AC_ARG_ENABLE([bin-op-int16],
-              [AS_HELP_STRING([--enable-bin-op-int16],
-                    [Native binary operations on int16 data.])],
-             [AS_IF([test "x$enable_bin_op_int16" != xno],
-                     [binop_int16=1], [binop_int16=0])], [])
-AS_IF([test "x$binop_int16" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_INT16], [$binop_int16],
-                   [Native binary operations on int16 data.])
-AC_SUBST(HAVE_BIN_OP_INT16, [$binop_int16])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 32-bit unsigned int binary operators)
-AC_ARG_ENABLE([bin-op-uint32],
-              [AS_HELP_STRING([--enable-bin-op-uint32],
-                    [Native binary operators on unsigned int32 data.])],
-             [AS_IF([test "x$enable_bin_op_uint32" != xno],
-                     [binop_uint32=1], [binop_uint32=0])], [])
-AS_IF([test "x$binop_uint32" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_UINT32], [$binop_uint32],
-                   [Native binary operations on unsigned int32 data.])
-AC_SUBST(HAVE_BIN_OP_UINT32, [$binop_uint32])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 32-bit signed int binary operators)
-AC_ARG_ENABLE([bin-op-int32],
-              [AS_HELP_STRING([--enable-bin-op-int32],
-                    [Native binary operations on int32 data.])],
-             [AS_IF([test "x$enable_bin_op_int32" != xno],
-                     [binop_int32=1], [binop_int32=0])], [])
-AS_IF([test "x$binop_int32" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_INT32], [$binop_int32],
-                   [Native binary operations on int32 data.])
-AC_SUBST(HAVE_BIN_OP_INT32, [$binop_int32])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 64-bit unsigned int binary operators)
-AC_ARG_ENABLE([bin-op-uint64],
-              [AS_HELP_STRING([--enable-bin-op-uint64],
-                    [Native binary operators on unsigned long data.])],
-             [AS_IF([test "x$enable_bin_op_uint64" != xno],
-                     [binop_uint64=1], [binop_uint64=0])], [])
-AS_IF([test "x$binop_uint64" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_UINT64], [$binop_uint64],
-                   [Native binary operations on unsigned long data.])
-AC_SUBST(HAVE_BIN_OP_UINT64, [$binop_uint64])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 64-bit signed int binary operators)
-AC_ARG_ENABLE([bin-op-int64],
-              [AS_HELP_STRING([--enable-bin-op-int64],
-                    [Native binary operations on int64 data.])],
-             [AS_IF([test "x$enable_bin_op_int64" != xno],
-                     [binop_int64=1], [binop_int64=0])], [])
-AS_IF([test "x$binop_int64" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_INT64], [$binop_int64],
-                   [Native binary operations on long64 data.])
-AC_SUBST(HAVE_BIN_OP_INT64, [$binop_int64])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 32-bit floating point binary operators)
-AC_ARG_ENABLE([bin-op-float32],
-              [AS_HELP_STRING([--enable-bin-op-float32],
-                    [Native binary operations on float32 data.])],
-             [AS_IF([test "x$enable_bin_op_float32" != xno],
-                     [binop_float32=1], [binop_float32=0])], [])
-AS_IF([test "x$binop_float32" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_FLOAT32], [$binop_float32],
-                   [Native binary operations on float32 data.])
-AC_SUBST(HAVE_BIN_OP_FLOAT32, [$binop_float32])
-AC_MSG_RESULT($binoptprint)
-
-AC_MSG_CHECKING(compilation of 64-bit floating point binary operators)
-AC_ARG_ENABLE([bin-op-float64],
-              [AS_HELP_STRING([--enable-bin-op-float64],
-                    [Native binary operations on float64 data.])],
-             [AS_IF([test "x$enable_bin_op_float64" != xno],
-                     [binop_float64=1], [binop_float64=0])], [])
-AS_IF([test "x$binop_float64" != x0], [binoptprint=yes], [binoptprint=no])
-AC_DEFINE_UNQUOTED([GAL_CONFIG_BIN_OP_FLOAT64], [$binop_float64],
-                   [Native binary operations on float64 data.])
-AC_SUBST(HAVE_BIN_OP_FLOAT64, [$binop_float64])
-AC_MSG_RESULT($binoptprint)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 # Read arguments about which programs to install. After checking if
 # the argument was actually called, remove any value the user might
 # have given by setting them to "yes" if they are not "no". These
@@ -808,6 +672,22 @@ AS_IF([test x$enable_guide_message = xyes],
                AS_ECHO(["    If PDF outputs are desired from ConvertType, it 
will abort"])
                AS_ECHO(["    with an EPS output which you can convert to PDF 
by other means."])
                AS_ECHO([]) ])
+        # The last two scenarios described below are taken from
+        # 
https://unix.stackexchange.com/questions/65700/is-it-safe-to-add-to-my-path-how-come
+        AS_IF([test "x$path_warning" = "xyes"],
+              [AS_ECHO(["  - Your PATH contains the current directory. This 
does not affect"])
+               AS_ECHO(["    this build and installation of Gnuastro in any 
way, it is just to"])
+               AS_ECHO(["    to remind you that this is a security risk."])
+               AS_ECHO(["      It is a very serious security risk if it is 
closer to the start"])
+               AS_ECHO(["    of your PATH: a malicious/wrong program might be 
run instead of"])
+               AS_ECHO(["    a desired program, someone might find out you 
frequently mistype"])
+               AS_ECHO(["    a command and install a matching one, someone 
might install a"])
+               AS_ECHO(["    fake command with the name of one that is not 
installed. You can"])
+               AS_ECHO(["    always run a program in the current directory by 
explicity adding"])
+               AS_ECHO(["    a \`./' before it's name. Run the following 
command after"])
+               AS_ECHO(["    installing Gnuastro to learn more about PATH:"])
+               AS_ECHO(["        $ info gnuastro \"Installation directory\""])
+               AS_ECHO([]) ])
         AS_ECHO(["  All checks related to the warning(s) above will be 
skipped."])
         AS_ECHO([])
       ]
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e605c3d..94b80d3 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -102,6 +102,9 @@ endif
 if COND_FITS
   MAYBE_FITS_MAN = man/astfits.1
 endif
+if COND_MATCH
+  MAYBE_MATCH_MAN = man/astmatch.1
+endif
 if COND_MKCATALOG
   MAYBE_MKCATALOG_MAN = man/astmkcatalog.1
 endif
@@ -126,10 +129,10 @@ endif
 #if COND_TEMPLATE
 #  MAYBE_TEMPLATE_MAN = man/astTEMPLATE.1
 #endif
-dist_man_MANS = $(MAYBE_ARITHMETIC_MAN) $(MAYBE_BUILDPROG_MAN)          \
-  $(MAYBE_CONVERTT_MAN) $(MAYBE_CONVOLVE_MAN) $(MAYBE_COSMICCAL_MAN)    \
-  $(MAYBE_CROP_MAN) $(MAYBE_FITS_MAN) $(MAYBE_WARP_MAN)                 \
-  $(MAYBE_MKCATALOG_MAN) $(MAYBE_MKNOISE_MAN) $(MAYBE_MKPROF_MAN)       \
+dist_man_MANS = $(MAYBE_ARITHMETIC_MAN) $(MAYBE_BUILDPROG_MAN)             \
+  $(MAYBE_CONVERTT_MAN) $(MAYBE_CONVOLVE_MAN) $(MAYBE_COSMICCAL_MAN)       \
+  $(MAYBE_CROP_MAN) $(MAYBE_FITS_MAN) $(MAYBE_MATCH_MAN) $(MAYBE_WARP_MAN) \
+  $(MAYBE_MKCATALOG_MAN) $(MAYBE_MKNOISE_MAN) $(MAYBE_MKPROF_MAN)          \
   $(MAYBE_NOISECHISEL_MAN) $(MAYBE_STATISTICS_MAN) $(MAYBE_TABLE_MAN)
 
 
@@ -176,6 +179,10 @@ man/astfits.1: $(top_srcdir)/bin/fits/args.h  $(ALLMANSDEP)
        $(MAYBE_HELP2MAN) -n "view and manipulate FITS headers"            \
                          --libtool $(toputildir)/fits/astfits
 
+man/astmatch.1: $(top_srcdir)/bin/match/args.h  $(ALLMANSDEP)
+       $(MAYBE_HELP2MAN) -n "match catalogs by 1D or 2D positions"        \
+                         --libtool $(toputildir)/match/astmatch
+
 man/astmkcatalog.1: $(top_srcdir)/bin/mkcatalog/args.h  $(ALLMANSDEP)
        $(MAYBE_HELP2MAN) -n "Make a catalog from labeled input images"    \
                          --libtool $(toputildir)/mkcatalog/astmkcatalog
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 7b4c947..8daf72e 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1,14 +1,5 @@
 People who's help must be acknowledged in the next release.
 
-Leindert Boogaard
-Nicolas Bouché
-Madusha Gunawardhana
-Aurélien Jarno
-Takashi Ichikawa
-Raúl Infante Sainz
-Floriane Leclercq
-Alan Lefor
-Alejandro Serrano Borlaff
-Lee Spitler
+Antonio Diaz Diaz
+Guillaume Mahler
 Ole Streicher
-David Valls-Gabaud
diff --git a/doc/forwebpage b/doc/forwebpage
index a03bec1..19a8376 100755
--- a/doc/forwebpage
+++ b/doc/forwebpage
@@ -327,11 +327,19 @@ echo %%%%% DONE %%%%%
 
 
 
-# Copy the gnuastro-top.html page into index.html (but only if it actually
-# differs from it.
-if ! diff gnuastro-top.html $topwebcheckout/gnuastro/index.html; then
-    cp gnuastro-top.html $topwebcheckout/gnuastro/index.html
-fi
+
+# Copy `gnuastro.en.html' page into `index.html'. Then copy the other
+# necessary webpage files.
+cp gnuastro.en.html $topwebcheckout/gnuastro/gnuastro.html
+cp gnuastro.fr.html gnuastro.translist $topwebcheckout/gnuastro/
+
+# `index.html' must be just a symbolic to `gnuastro.html'. In case this is
+# the first time, CVS might have downloaded a full file and not the
+# link. To be safe, we'll just delete index.html and build a new symbolic
+# link.
+rm -f $topwebcheckout/gnuastro/index.html
+ln -s $topwebcheckout/gnuastro/gnuastro.html 
$topwebcheckout/gnuastro/index.html
+
 
 
 
diff --git a/doc/gnuastro-top.html b/doc/gnuastro.en.html
similarity index 72%
rename from doc/gnuastro-top.html
rename to doc/gnuastro.en.html
index ad74e98..aaa7930 100644
--- a/doc/gnuastro-top.html
+++ b/doc/gnuastro.en.html
@@ -1,57 +1,25 @@
-<!--#include virtual="/server/header.html" -->
-<!-- Parent-Version: 1.77 -->
-
-<!-- This is the template document for GNU web pages.  We use
-     server side includes (#include) for common elements, for
-     instance, the very first line of the file.  If you're reading
-     this in its expanded form, you can retrieve the original source,
-     with the SSI statements intact, from
-     
http://web.cvs.savannah.gnu.org/viewvc/*checkout*/www/server/standards/boilerplate.html?root=www&content-type=text%2Fplain
--->
-
-<!-- Instructions for adapting this boilerplate to a new project: -->
-
-<!-- 1. In the line above starting "Parent-Version:", remove the
-        "$Revision...$" from around the revision number,
-        leaving just Parent-Version: and the number. -->
-
-<!-- 2. Replace "baz" with the name of your project.
-        You should be able to do this with search and replace;
-        making sure that the search is case insensitive and
-        that the case of the replacement matches the case
-        of the string found. In Emacs, query-replace will do this
-        when case-fold-search and case-replace are both non-nil
-        and both search and replacement string are given in lower case. -->
-
-<!-- 3. Of course update the actual information according to your project,
-        such as mailing lists, project locations, and maintainer name.  -->
-
-<!-- 4. You can use the patch-from-parent script to semi-automate
-        merging future changes to the boilerplate with your file:
-        
http://web.cvs.savannah.gnu.org/viewvc/*checkout*/www/server/standards/patch-from-parent?root=www&content-type=text%2Fplain
-        -->
-
-<!-- If you would like to make sure your page validates with HTML5, that
-     would be a good thing.  To do that, change the first line from
-     to /server/html5-header.html before trying the validation.  Maybe
-     someday we will be able to make /server/header be HTML5.  -->
+<!--#include virtual="/server/html5-header.html" -->
 
+<!-- Parent-Version: 1.84 -->
 <title>GNU Astronomy Utilities - Gnuastro -
   - GNU Project - Free Software Foundation</title>
 
 <style type="text/css"><!--
+#content {
+   max-width: 48em;
+   margin: 0 auto 2.5em;
+}
 #table-of-contents {
    float: left;
    margin: 1.3em 0 1.5em 0;
 }
-#content #table-of-contents h4 { margin-top: .8em; }
-#table-of-contents a:hover { text-decoration: underline; }
-#table-of-contents h4 { text-align: center; }
-h3 { clear: both; }
-#content h3 a[href^="#"] {
-   color: #333; text-decoration: none;
+#table-of-contents h4 {
+   text-align: center;
+   margin-top: .8em;
 }
 #table-of-contents a { text-decoration: none; }
+#table-of-contents a:hover { text-decoration: underline; }
+h3 { clear: both; }
 @media (min-width: 40em) {
    h3 { clear: none; }
    #table-of-contents {
@@ -60,19 +28,11 @@ h3 { clear: both; }
    }
 }
 --></style>
-
-
-
-
-
-
-
-
-<!--#include virtual="/server/gnun/initial-translations-list.html" -->
+<!--#include virtual="gnuastro.translist" -->
 <!--#include virtual="/server/banner.html" -->
 <h2>GNU Astronomy Utilities</h2>
 
-<hr />
+<hr class="thin" />
 <div id="table-of-contents" class="emph-box">
 <h4>Table of Contents</h4>
 <ul>
@@ -88,23 +48,19 @@ h3 { clear: both; }
 <hr class="no-display"/>
 </div>
 
-
-
-
-
 <h3 id="introduction">Introduction</h3>
 <p>The GNU Astronomy Utilities (Gnuastro) is an official GNU package
 consisting of various programs and library functions for the manipulation
 and analysis of astronomical data. All the programs share the same basic
 command-line user interface for the comfort of both the users and
 developers. Gnuastro is written to comply fully with
-the <a href="https://www.gnu.org/prep/standards/";>GNU coding standards</a>
+the <a href="/prep/standards/">GNU coding standards</a>
 so it integrates finely with the GNU/Linux operating system. This also
 enables astronomers to expect a fully familiar experience in the source
 code, building, installing and command-line user interaction that they have
 seen in all the other GNU software that they use.</p>
 
-In case you are new to Gnuastro, you might find these links useful:
+<p>In case you are new to Gnuastro, you might find these links useful:</p>
 
 <ul>
 
@@ -114,7 +70,7 @@ In case you are new to Gnuastro, you might find these links 
useful:
   <li><a href="manual/html_node/Gnuastro-programs-list.html">List of
 Gnuastro programs</a>: For a complete list of the programs. </li>
 
-  <li><a 
href="http://www.gnu.org/software/gnuastro/manual/html_node/Tutorials.html#Tutorials";>Tutorials</a>:
+  <li><a href="manual/html_node/Tutorials.html#Tutorials">Tutorials</a>:
 for entertaining and easy to read real world examples of using
     Gnuastro.</li>
 
@@ -128,9 +84,9 @@ for entertaining and easy to read real world examples of 
using
 
 <p>
   The current stable release
-  is <a href="http://ftp.gnu.org/gnu/gnuastro/gnuastro-0.4.tar.gz";>Gnuastro
-  0.4</a> (September 13th, 2017).
-  Use <a href="http://ftpmirror.gnu.org/gnuastro/gnuastro-0.4.tar.gz";>a
+  is <a href="http://ftp.gnu.org/gnu/gnuastro/gnuastro-0.5.tar.gz";>Gnuastro
+  0.5</a> (December 22nd, 2017).
+  Use <a href="http://ftpmirror.gnu.org/gnuastro/gnuastro-0.5.tar.gz";>a
   mirror</a> if possible.
 
   <!-- Comment the test release notice when the test release is not more
@@ -141,17 +97,17 @@ for entertaining and easy to read real world examples of 
using
   To stay up to date, please subscribe.</p>
 
 <p>For details of the significant changes please see the
-  <a 
href="http://git.savannah.gnu.org/cgit/gnuastro.git/plain/NEWS?id=gnuastro_v0.4";>NEWS</a>
+  <a 
href="https://git.savannah.gnu.org/cgit/gnuastro.git/plain/NEWS?id=gnuastro_v0.5";>NEWS</a>
   file.</p>
 
 <p>The
-  canonical <a 
href="http://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz";></a<>http://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz</a>
+  canonical <a 
href="https://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz";>https://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz</a>
   will always contain the most recent Gnuastro release. Use the mirror link
-  (<a 
href="http://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz";>http://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz</a>)
+  (<a 
href="https://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz";>https://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz</a>)
   if possible.</p>
 
 <p>Previous versions and PGP signatures are always available
-  at <a 
href="http://ftp.gnu.org/gnu/gnuastro";>http://ftp.gnu.org/gnu/gnuastro</a>. Use 
<a href="http://ftpmirror.gnu.org/gnuastro";>a
+  at <a 
href="https://ftp.gnu.org/gnu/gnuastro";>https://ftp.gnu.org/gnu/gnuastro</a>. 
Use <a href="https://ftpmirror.gnu.org/gnuastro";>a
   mirror</a> if possible. </p>
 
 
@@ -174,7 +130,7 @@ the <a 
href="manual/html_node/Dependencies.html">dependencies</a>,
 <a href="manual/html_node/Downloading-the-source.html">downloading
 methods</a>, and
 the <a href="manual/html_node/Build-and-install.html">building and
-installation</a> of Gnuastro.
+installation</a> of Gnuastro.</p>
 
 
 
@@ -183,13 +139,14 @@ installation</a> of Gnuastro.
 
 <p>The <a href="manual/">Gnuastro book</a> (official Gnuastro documentation
 or manual) is available online in various formats, as
-is <a href="http://www.gnu.org/manual/manual.en.html";>documentation for
+is <a href="/manual/manual.html">documentation for
 most GNU software</a>. After installation, you can access the complete
 book, or the sections related to individual programs and library headers on
-the command-line (in <a href="../texinfo/manual/info/info.html">Info</a>
+the command-line (in <a
+href="/software/texinfo/manual/texinfo/html_node/Info-Files.html#Info-Files">Info</a>
 format). See <a href="manual/html_node/Getting-help.html">Getting help</a>
-for more. As a summary, here are the ways you can immediately find navigate
-to any major part of the book on the command-line:
+for more. As a summary, here are the ways you can immediately navigate
+to any major part of the book on the command-line:</p>
 
 <ul>
   <li><code>info gnuastro</code>: To view the complete Gnuastro book from
@@ -248,7 +205,7 @@ official repository.</li>
 <p>Security reports that should not be made immediately public can be
 sent directly to the maintainer.  If there is no response to an urgent
 issue, you can escalate to the general
-<a href="http://lists.gnu.org/mailman/listinfo/security";>security</a>
+<a href="https://lists.gnu.org/mailman/listinfo/security";>security</a>
 mailing list for advice.</p>
 
 
@@ -271,13 +228,13 @@ mailing list for advice.</p>
   code that created the bug so we can reproduce and thus fix it faster.</p>
 
 <ul>
-  <li><a href="https://savannah.gnu.org/support/?func=additem&group=gnuastro";
+  <li><a 
href="https://savannah.gnu.org/support/?func=additem&amp;group=gnuastro";
   target="_blank">Submit your bug</a> through the main project management
   webpage. This is the recommended way to inform us of your bug. Please
   also fill out the meta-data (category, item group and etc) as much as
   possible.</li>
-  <li>Send a mail
-  to <a href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>
+  <li>Send a mail to
+  &lt;<a 
href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>&gt;
   which is one of Gnuastro's <a href="#mail">mailing lists</a>. This will
   be slower than the first. Because of the large number of spam messages,
   this mailing list is moderated and other developers will only see it
@@ -299,7 +256,7 @@ mailing list for advice.</p>
   contribute. There is even a full chapter dedicated
   to <a href="manual/html_node/Developing.html">Developing</a> to make it
   as easy as possible for you to get involved. Also
-  see <a href="http://www.gnu.org/help/";>How to help GNU</a> for joining
+  see <a href="/help/help.html">How to help GNU</a> for joining
   the full GNU project.</p>
 
 <dl>
@@ -307,7 +264,7 @@ mailing list for advice.</p>
 
 <dd>Trying the latest test release (when available) is always appreciated.
 Test releases of Gnuastro can be found at
-<a 
href="http://alpha.gnu.org/gnu/gnuastro/";>http://alpha.gnu.org/gnu/gnuastro/</a>
+<a 
href="https://alpha.gnu.org/gnu/gnuastro/";>http://alpha.gnu.org/gnu/gnuastro/</a>
 (via HTTP) and
 <a 
href="ftp://alpha.gnu.org/gnu/gnuastro/";>ftp://alpha.gnu.org/gnu/gnuastro/</a>
 (via FTP).</dd>
@@ -324,8 +281,8 @@ sources, <a 
href="https://savannah.gnu.org/bugs/?group=gnuastro";>bug
 trackers</a>, <a href="https://savannah.gnu.org/task/?group=gnuastro";>task
 trackers</a> (planned features to be added), and other information, please
 see the
-<a href="http://savannah.gnu.org/projects/gnuastro/";>Gnuastro project
-page</a> at <a href="http://savannah.gnu.org";>savannah.gnu.org</a>. The
+<a href="https://savannah.gnu.org/projects/gnuastro/";>Gnuastro project
+page</a> at <a href="https://savannah.gnu.org";>savannah.gnu.org</a>. The
 trackers can be a good starting point if you want to get involved in the
 coding. To stay up to date with Gnuastro's development activities, please
 subscribe to
@@ -337,15 +294,15 @@ mailing lists.</dd>
 <dd>Gnuastro is version controlled using
   Git. The <a href="manual/html_node/Version-controlled-source.html">version
   controlled source</a> can
-  be <a href="http://git.savannah.gnu.org/cgit/gnuastro.git/tree/";>inspected
+  be <a href="https://git.savannah.gnu.org/cgit/gnuastro.git/tree/";>inspected
   online</a>, or you
-  can <a href="http://git.savannah.gnu.org/cgit/gnuastro.git/log/";>see the
+  can <a href="https://git.savannah.gnu.org/cgit/gnuastro.git/log/";>see the
   latest history</a>. To keep a local copy, please clone it onto your
   system with any one of the following commands (if it works, the first one
   is recommended).
-  <pre class="emph-box"><samp>git clone git://git.sv.gnu.org/gnuastro
-git clone http://git.sv.gnu.org/r/gnuastro.git
-</samp></pre></dd>
+  <pre class="emph-box">git clone git://git.sv.gnu.org/gnuastro
+git clone http://git.sv.gnu.org/r/gnuastro.git</pre>
+</dd>
 
 <dd>To configure and build the version controlled source, you will need to
   <a href="manual/html_node/Bootstrapping.html">bootstrap</a> it (also
@@ -357,9 +314,8 @@ git clone http://git.sv.gnu.org/r/gnuastro.git
 <dt>Maintainer</dt>
 
 <dd>Gnuastro was created and is currently maintained by
-  <a href="https://cral.univ-lyon1.fr/labo/perso/mohammad.akhlaghi/";>Mohammad
-Akhlaghi</a>
-<a href="mailto:akhlaghi=at=gnu.org";>&lt;akhlaghi::at::gnu.org&gt;</a>.
+  <a href="http://akhlaghi.org";>Mohammad Akhlaghi</a>
+&lt;<a 
href="mailto:mohammad=at=akhlaghi.org";>mohammad::at::akhlaghi.org</a>&gt;.
 Please use the mailing lists for contact. </dd>
 
 
@@ -373,7 +329,7 @@ Please use the mailing lists for contact. </dd>
 
 <p>GNU Astronomy Utilities (Gnuastro) is free software; you can
 redistribute it and/or modify it under the terms of
-the <a href="http://www.gnu.org/licenses/gpl.html"; rel="license">GNU
+the <a href="/licenses/gpl.html" rel="license">GNU
 General Public License</a> as published by the Free Software
 Foundation; either version&nbsp;3 of the License, or (at your option)
 any later version.</p>
@@ -384,10 +340,10 @@ any later version.</p>
 <div class="unprintable">
 
 <p>Please send general FSF &amp; GNU inquiries to
-<a href="mailto:gnu@gnu.org";>&lt;gnu@gnu.org&gt;</a>.
-There are also <a href="/contact/">other ways to contact</a>
-the FSF.  Broken links and other corrections or suggestions can be sent
-to <a href="mailto:bug-gnuastro@gnu.org";>&lt;bug-gnuastro@gnu.org&gt;</a>.</p>
+&lt;<a href="mailto:gnu@gnu.org";>gnu@gnu.org</a>&gt;.
+There are also <a href="/contact/">other ways to contact</a> the FSF.
+Broken links and other corrections or suggestions can be sent to &lt;<a
+href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>&gt;.</p>
 
 <p><!-- TRANSLATORS: Ignore the original text in this paragraph,
         replace it with the translation of these two:
@@ -410,7 +366,7 @@ of this article.</p>
 
 <!-- Regarding copyright, in general, standalone pages (as opposed to
      files generated as part of manuals) on the GNU web server should
-     be under CC BY-ND 3.0 US.  Please do NOT change or remove this
+     be under CC BY-ND 4.0.  Please do NOT change or remove this
      without talking with the webmasters or licensing team first.
      Please make sure the copyright date is consistent with the
      document.  For web pages, it is ok to list just the latest year the
@@ -428,14 +384,14 @@ of this article.</p>
 <p>Copyright &copy; 2015-2016 Free Software Foundation, Inc.</p>
 
 <p>This page is licensed under a <a rel="license"
-href="http://creativecommons.org/licenses/by-nd/3.0/us/";>Creative
-Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
+href="http://creativecommons.org/licenses/by-nd/4.0/";>Creative
+Commons Attribution-NoDerivs 4.0 International License</a>.</p>
 
 <!--#include virtual="/server/bottom-notes.html" -->
 
 <p class="unprintable">Updated:
 <!-- timestamp start -->
-$Date: 2016/10/19 09:04:37 $
+$Date: 2017/09/12 22:25:08 $
 <!-- timestamp end -->
 </p>
 </div>
diff --git a/doc/gnuastro.fr.html b/doc/gnuastro.fr.html
index 3a1fbfe..e6faa39 100644
--- a/doc/gnuastro.fr.html
+++ b/doc/gnuastro.fr.html
@@ -1,73 +1,27 @@
-<!--#include virtual="/server/header.html" -->
-<!-- Parent-Version: 1.77 -->
+<!--#set var="ENGLISH_PAGE" value="gnuastro.html" -->
 
-<!-- This is the template document for GNU web pages.  We use
-     server side includes (#include) for common elements, for
-     instance, the very first line of the file.  If you're reading
-     this in its expanded form, you can retrieve the original source,
-     with the SSI statements intact, from
-     
http://web.cvs.savannah.gnu.org/viewvc/*checkout*/www/server/standards/boilerplate.html?root=www&content-type=text%2Fplain
--->
+<!--#include virtual="/server/html5-header.fr.html" -->
+<!-- Parent-Version: 1.84 -->
 
-<!-- Instructions for adapting this boilerplate to a new project: -->
-
-<!-- 1. In the line above starting "Parent-Version:", remove the
-        "$Revision...$" from around the revision number,
-        leaving just Parent-Version: and the number. -->
-
-<!-- 2. Replace "baz" with the name of your project.
-        You should be able to do this with search and replace;
-        making sure that the search is case insensitive and
-        that the case of the replacement matches the case
-        of the string found. In Emacs, query-replace will do this
-        when case-fold-search and case-replace are both non-nil
-        and both search and replacement string are given in lower case. -->
-
-<!-- 3. Of course update the actual information according to your project,
-        such as mailing lists, project locations, and maintainer name.  -->
-
-<!-- 4. You can use the patch-from-parent script to semi-automate
-        merging future changes to the boilerplate with your file:
-        
http://web.cvs.savannah.gnu.org/viewvc/*checkout*/www/server/standards/patch-from-parent?root=www&content-type=text%2Fplain
-        -->
-
-<!-- If you would like to make sure your page validates with HTML5, that
-     would be a good thing.  To do that, change the first line from
-     to /server/html5-header.html before trying the validation.  Maybe
-     someday we will be able to make /server/header be HTML5.  -->
-
-<title>Les Utilités GNU d'Astronomie - Gnuastro -
-  Le Projet GNU - Fondation du Logiciel Libre</title>
-
-<!-- ATTENTION RELECTEUR
-
- Merci beaucoup pour votre aide. J'ai fait quelques notes avec les
- traductions que je pensais étaient mal, mais probablement il y a certains
- qui ont échappé mon oeil. Le format est plus ou moins comme suivant: Note
- anglais + note français. Original Text: la texte original.
-
- ATTENTION PROOF READER/TRANSLATOR.
-
- Thanks a lot for your help. I've made some notes with the translations
- that I thought were bad but there are probably some that've escaped my
- eye. The format is more or less as follows: English note + French
- note. Original Text: the original text.
-
- Contact me at macquarrielucas@gmail.com if necessary. -->
+<title>Utilitaires GNU pour l'astronomie - Gnuastro -
+  Projet GNU - Free Software Foundation</title>
 
 <style type="text/css"><!--
+#content {
+   max-width: 48em;
+   margin: 0 auto 2.5em;
+}
 #table-of-contents {
    float: left;
    margin: 1.3em 0 1.5em 0;
 }
-#content #table-of-contents h4 { margin-top: .8em; }
-#table-of-contents a:hover { text-decoration: underline; }
-#table-of-contents h4 { text-align: center; }
-h3 { clear: both; }
-#content h3 a[href^="#"] {
-   color: #333; text-decoration: none;
+#table-of-contents h4 {
+   text-align: center;
+   margin-top: .8em;
 }
 #table-of-contents a { text-decoration: none; }
+#table-of-contents a:hover { text-decoration: underline; }
+h3 { clear: both; }
 @media (min-width: 40em) {
    h3 { clear: none; }
    #table-of-contents {
@@ -76,349 +30,322 @@ h3 { clear: both; }
    }
 }
 --></style>
+<!--#include virtual="gnuastro.translist" -->
+<!--#include virtual="/server/banner.fr.html" -->
+<h2>Utilitaires GNU pour l'astronomie</h2>
 
-
-
-
-
-
-
-
-<!--#include virtual="/server/gnun/initial-translations-list.html" -->
-<!--#include virtual="/server/banner.html" -->
-<h2>Les Utilités GNU d'Astronomie</h2>
-
-<hr />
+<hr class="thin" />
 <div id="table-of-contents" class="emph-box">
-<h4>La Table des Matières</h4>
+<h4>Table des Matières</h4>
 <ul>
   <li><a href="#introduction">Introduction</a></li>
-  <li><a href="#download">Télécharger</a></li>
+  <li><a href="#download">Téléchargement</a></li>
   <li><a href="#installation">Installation</a></li>
-  <li><a href="#documentation">Le Livre (Les Documents)</a></li>
-  <li><a href="#mail">La Liste de Distribution</a></li>
-  <li><a href="#bug">Rapporter un Bug</a></li>
-  <li><a href="#contribute">Nous-Aider</a></li><!-- Erreur possible/ This is 
probably not correct and needs revision -->
-  <li><a href="#license">Autorisation</a></li><!-- Un autre erreur possible/ 
Another probable error -->
+  <li><a href="#documentation">Documentation – le Livre</a></li>
+  <li><a href="#mail">Listes de diffusion</a></li>
+  <li><a href="#bug">Signalement de bogues</a></li>
+  <li><a href="#contribute">Participer</a></li>
+  <li><a href="#license">Licence</a></li>
 </ul>
 <hr class="no-display"/>
 </div>
 
 
-
-
-
 <h3 id="introduction">Introduction</h3>
-<p> Les Utilités GNU d'Astronomie(Gnuastro) est un officiel progiciel GNU
-  consister des logiciels séperé pour la manipulation et analyse de données
-  astronomique. Tous les différent utilités utilisent la même interface de
-  ligne de commande pour le confort des utilisatuers et des développeurs.
-  Les Utilités Gnu d'Astronomie est écrit pour se conformer avec
-  <a href="https://www.gnu.org/prep/standards/";>Les Normes de Code GNU</a>
-  donc il va bien avec le systèm d'exploitation de GNU/Linux. Aussi, ce
-  permet les astronomes à s'attendent à <!-- Original Text: 'This also allows 
astronomers to expect a fully familiar...' vraisemblable mal rédigé/ Most 
likely badly worded -->
-  une expérience famillière avec le code source, l'installation, le bâtir, 
<!-- Probablement, il y a un mot mieux pour ça. Bâtir comme Bâtir logiciel. 
Peut-être Bâtirant?/ There is probably another word for this. Building as in 
building software. Possible could be bâtirant -->
-  et l'interaction d'utilisateur de linge de commande, qu'ils ont vu avec tous
-  les autres logiciels de GNU qu'ils utilisent.
-  <!-- Original Text: 'which they have seen with all the other gnu software
-  that they use' Ce semble maladroit en anglais aussi/ This also sounds a
-  bit wierd in English as well --></p>
-
-Au cas où tu ne connais pas Gnuastro, ces liens peuvent t'aider: <!-- Original 
Text: ' You might find these links useful' -->
-<ul>
 
-  <li><a href="manual/html_node/Quick-start.html">Démarrage rapide <!-- 
Original Text: 'Quick start' -->
-    </a>: Installer Gnuastro.</li>
+<p> Les utilitaires GNU pour l'astronomie (Gnuastro – <cite>GNU Astronomy
+  Utilities</cite>) font partie des logiciels GNU officiels. Il s'agit d'un
+  ensemble de programmes séparés pour la manipulation et l'analyse des
+  données astronomiques. Les différents utilitaires utilisent tous la même
+  interface en ligne de commande pour le confort des utilisateurs et des
+  développeurs. Les utilitaires GNU pour l'astronomie se conforment aux
+  <a href="/prep/standards/">normes de codage GNU</a>, et par conséquent
+  s'intègrent bien au système d'exploitation GNU/Linux. Les astronomes
+  ne seront donc pas déroutés par le code source, les méthodes de
+  compilation et d'installation ou les interactions en ligne de commande,
+  car ils les ont déjà vus avec tous les autres logiciels GNU qu'ils
+  utilisent.</p>
+
+<p>Si vous ne connaissez pas Gnuastro, voici quelques liens qui peuvent
+  vous être utiles&nbsp;:</p>
 
-  <li><a href="manual/html_node/GNU-Astronomy-Utilities-list.html">La Liste
-  des Utilités GNU d'Astronomie</a>: Pour une liste complète des
-  utilités. </li>
+<ul>
+  <li><a href="manual/html_node/Quick-start.html">Démarrage rapide</a> –
+    installer Gnuastro&nbsp;;</li>
 
-  <li><a 
href="http://www.gnu.org/software/gnuastro/manual/html_node/Tutorials.html#Tutorials";>Les
-    Tutoriels</a>: pour les exemples amusant de la réalité qui sont
-    facile-à-lire </li>
+  <li><a href="manual/html_node/GNU-Astronomy-Utilities-list.html">Liste
+    complète</a> des utilitaires GNU pour l'astronomie&nbsp;;</li>
 
+  <li><a href="manual/html_node/Tutorials.html#Tutorials">Tutoriels</a> –
+    exemples concrets d'utilisation, amusants et faciles à lire.</li>
 </ul>
 
 
+<h3 id="download">Téléchargement</h3>
 
+<p>La version stable actuelle
+  est <a href="https://ftp.gnu.org/gnu/gnuastro/gnuastro-0.5.tar.gz";>Gnuastro
+  0.5</a> (sortie le 22 december
+  2017). Utilisez <a 
href="https://ftpmirror.gnu.org/gnuastro/gnuastro-0.5.tar.gz";>un
+  miroir</a> si possible.  <br />Les nouvelles publications sont annoncées
+  sur <a 
href="https://lists.gnu.org/mailman/listinfo/info-gnuastro";>info-gnuastro</a>.
+  Abonnez-vous pour rester au courant.</p>
 
+<p>Les changements importants sont décrits dans le
+  fichier <a 
href="https://git.savannah.gnu.org/cgit/gnuastro.git/plain/NEWS?id=gnuastro_v0.5";>
+  NEWS</a>.</p>
 
-<h3 id="download">Télécharger</h3>
-
-<p>La sortie actuelle stable
-  est <a href="http://ftp.gnu.org/gnu/gnuastro/gnuastro-0.4.tar.gz";>Gnuastro
-  0.4</a> (septembre 13, 2017).
-  Utilisez <a href="http://ftpmirror.gnu.org/gnuastro/gnuastro-0.4.tar.gz";>un
-  miroir</a> si possible.
-
-  <br />Nouveaux sorties sont annoncé
-  sur <a 
href="https://lists.gnu.org/mailman/listinfo/info-gnuastro";>info-gnuastro</a>,
-  à tenir à jour, s'il vous plait vous abonnez.
-
-<p>Pour les détails des changements importants, vois le
-fichier <a 
href="http://git.savannah.gnu.org/cgit/gnuastro.git/plain/NEWS?id=gnuastro_v0.4";>NOUVELLES</a></p>
-
-<p>Le
-  canonical <a 
href="http://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz";></a><a>http://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz</a>
-  serait toujours contenir la version plus récente de Gnuastro. Utilisez le
-  lien miroir
-  (<a 
href="http://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz";>http://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz</a>)
+<p>Le lien
+  canonique <a href="https://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz";>
+  https://ftp.gnu.org/gnu/gnuastro/gnuastro-latest.tar.gz</a> renvoie
+  toujours à la version la plus récente de Gnuastro. Utilisez un miroir
+  (<a 
href="https://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz";>https://ftpmirror.gnu.org/gnuastro/gnuastro-latest.tar.gz</a>)
   si possible.</p>
 
-<p>Les versions précédents et signatures PGP sont toujours disponible sur
-  <a 
href="http://ftp.gnu.org/gnu/gnuastro";>http://ftp.gnu.org/gnu/gnuastro</a>. 
Utilizez <a href="http://ftpmirror.gnu.org/gnuastro";>
-  un miroir</a> si possible. </p>
+<p>Les versions précédentes et les signatures PGP sont toujours disponibles sur
+  <a 
href="https://ftp.gnu.org/gnu/gnuastro";>https://ftp.gnu.org/gnu/gnuastro</a>.
+  Utilisez un <a href="https://ftpmirror.gnu.org/gnuastro";>miroir</a> si
+  possible.</p>
 
 
 <h3 id="installation">Installation</h3>
 
-<p>Voyez  <a href="manual/html_node/Quick-start.html">Démarge rapide</a> pour 
un
-petit rappel des commandes d'installation et bâtir de Gnuastro.</p>
-
-<p>Gnuastro a seulement trois dependencies
-obligatoires: <a href="manual/html_node/GNU-Scientific-Library.html">GNU
-Scientific
-Library</a>, <a href="manual/html_node/CFITSIO.html">CFITSIO</a>, <a 
href="manual/html_node/WCSLIB.html">WCSLIB</a>.</p>
-
-<p>Pour un description moins bref, voyez le chapitre d'
-<a href="manual/html_node/Installation.html">Installation</a>
-du <a href="manual/">livre Gnuastro</a>. Il expliques complètement les
-<a href="manual/html_node/Dependencies.html">dependencies</a>,
-<a href="manual/html_node/Downloading-the-source.html">mode de
-téléchargements</a>, et
-le <a href="manual/html_node/Build-and-install.html">bâtirment et
-installation</a> de Gnuastro.
-
-<h3 id="documentation">Livre de Gnuastro (Les documents)</h3>
-
-<p>Le <a href="manual/">livre de Gnuastro</a> (Les documents de Gnuastro
-  officiel où le manuel) est disponsable en ligne en différent formats, et
-  aussi est <!-- this is definitely wrong/ C'est mauvais, sans aucun
-  doute. Original text: The gnuastro book is available online in different
-  formats, and so is documentation f\ or most gnu software --> les
-  documents <a href="http://www.gnu.org/manual/manual.en.html";>pour la
-  plupart de logiciel GNU</a>. Aprés l'installation, vous pouvez accèder le
-  livre complet, où les parties relié à les utilités individuel sur la
-  linge de commande (en
-  format <a href="../texinfo/manual/info/info.html">Info</a>
-  ). Voir <a href="manual/html_node/Getting-help.html">Trouvant d'aide</a>
-  pour plus d'infomation. En résumé, voici les façons à vous guider à les
-  parties plus important du livre sur la ligne de commande:
-
+<p>Le chapitre <cite><a href="manual/html_node/Quick-start.html">Quick
+  start</a></cite> du <a href="manual/">Livre de Gnuastro</a> résume les
+  commandes de compilation et d'installation.</p>
+
+<p>Gnuastro n'a que trois dépendances obligatoires&nbsp;:
+  <a href="manual/html_node/GNU-Scientific-Library.html">GNU Scientific
+  Library</a>, <a href="manual/html_node/CFITSIO.html">CFITSIO</a> et
+  <a href="manual/html_node/WCSLIB.html">WCSLIB</a>.</p>
+
+<p>Dans le chapitre <cite><a href="manual/html_node/Installation.html">
+  Installation</a></cite>, vous trouverez des explications complètes sur
+  les
+  <a href="manual/html_node/Dependencies.html">dépendances</a>, le
+  <a href="manual/html_node/Downloading-the-source.html">téléchargement</a>,
+  la <a href="manual/html_node/Build-and-install.html">compilation et
+  l'installation</a> de Gnuastro.</p>
+
+
+<h3 id="documentation">Documentation – le Livre</h3>
+
+<p>Le <a href="manual/">Livre de Gnuastro</a> (documentation officielle, ou
+   manuel) est disponible en ligne en différent formats, de même que la
+   documentation de <a href="/manual/manual.html">la plupart des logiciels
+   GNU</a>. Après installation, vous pouvez accéder en ligne de commande au
+   livre complet ou aux parties se rapportant à des utilitaires
+   particuliers (au
+   format <a 
href="/software/texinfo/manual/texinfo/html_node/Info-Files.html#Info-Files">
+   Info</a>). Vous trouverez des information complètes
+   dans <cite><a href="manual/html_node/Getting-help.html">Getting
+   help</a></cite>. En résumé, voici comment vous pouvez ouvrir
+   immédiatement en ligne de commande les parties les plus importantes du
+   livre&nbsp;:</p>
 
 <ul>
-  <li><code>info gnuastro</code>: Pour voir le livre Gnuastro complet
-    à debut.</li>
-  <li><code>info ProgramName</code>: Pour voir la partie à propos d'un
-    utilité spécifique.Par exemple <code>info NoiseChisel</code>
-    où <code>info ImageCrop</code>.</li>
-  <li><code>info astprogname</code>: Pour voir la sous-section seulement
-    "Invoking ProgramName" du manuel. Chaque programme a une sous-section
-    qu'explique les input(s), les output(s), et les options de la ligne de
-    commande pour cet programme. Par exemple <code>info
-    astnoisechisel</code> où <code>info astimgcrop</code>.</li>
-  <li><code>astprogname --help</code>: Un signalement et liste complète des
-    options (classé par contexte) pour cette programme
-    l'imprimera. <!-- Future tense is tough/ Futur est dur. Original Text:
-    will be printed. --> Par exemeple <code>astnoisechisel --help</code>
-    où <code>astimgcrop --help</code>.</li>
-  <li><code>man astprogname</code>: Une page manuel listant les options et
-    les arguments de la programme l'imprimera. Par exemple
-    <code>man astnoisechisel</code>,
-  où <code>man astimgcrop</code>.</li>
+  <li><code>info&nbsp;gnuastro</code> pour voir le livre complet
+    depuis le début.</li>
+
+  <li><code>info&nbsp;ProgramName</code> pour voir l'ensemble de la section
+    concernant un utilitaire particulier. Par exemple
+    <code>info&nbsp;NoiseChisel</code> ou
+    <code>info&nbsp;ImageCrop</code>.</li>
+
+  <li><code>info&nbsp;astprogname</code> pour voir uniquement la sous-section
+    <cite>Invoking ProgramName</cite> du manuel. Chaque programme a une
+    sous-section de ce type qui explique les entrées/sorties et les options
+    de la ligne de commande pour ce programme. Par exemple <code>info
+    astnoisechisel</code> ou <code>info&nbsp;astimgcrop</code>.</li>
+
+  <li><code>astprogname&nbsp;--help</code> affichera une description de ce
+    programme ainsi que la liste complète des options (classées par
+    contexte).  Par exemple <code>astnoisechisel&nbsp;--help</code> ou
+    <code>astimgcrop&nbsp;--help</code>.</li>
+
+  <li><code>man&nbsp;astprogname</code> affichera une page de manuel
+    donnant la liste des options et des arguments du programme. Par exemple
+    <code>man&nbsp;astnoisechisel</code>, ou
+    <code>man&nbsp;astimgcrop</code>.</li>
 </ul>
 
-<h3 id="mail">La Liste de distribution</h3>
 
-<p>Gnuastro a les listes de distribution suivantes:</p> <!-- Possible
-error/Erreur possible. Original Text: 'Gnuastro has the following mailing
-lists' -->
+<h3 id="mail">Listes de diffusion</h3>
 
+<p>Gnuastro a les listes de diffusion suivantes&nbsp;:</p>
 <ul>
-
-  <li><a 
href="https://lists.gnu.org/mailman/listinfo/info-gnuastro";>info-gnuastro</a>:
-  Toutes annonces officielle <!-- wrong tout/toutes/tous/toute
-  mal. Original text: all official announcements --> circuleront dans la
-  liste de distribution là.</li>
-
-  <li><a 
href="https://lists.gnu.org/mailman/listinfo/help-gnuastro";>help-gnuastro</a>:
-    Contacter les utilisateurs expérimenté et développeurs sur des
-    problèmes et conseils pour Gnuastro (Il serait utile si vous
-    lisiez <a href="manual/">les documents</a> à l'avance).</li>
-
-  <li><a 
href="https://lists.gnu.org/mailman/listinfo/bug-gnuastro";>bug-gnuastro</a>:
-  Signaler un bug, ou suggérer des nouvelles fonctions.
-  (voir <a href="manual/html_node/Report-a-bug.html">Signalez un bug</a>
-  et <a href="manual/html_node/Suggest-new-feature.html">Suggérer un
-  nouveau fonction </a> dans les documents). </li>
-
-  <li><a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-devel";>gnuastro-devel</a>:
-Les discussions à propos du développement (Pour l'intérêt des développeurs
-surtout) <!-- Original text: Mostly for gnuastro developers) -->.</li>
-
-  <li><a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-commits";>gnuastro-commits</a>:
-    À propos des commits git <!-- about git commits --> faisaient aux
-    versions de Gnuastro, contrôlé par l'histoire dans le repository
-    officiel.</li>
+  <li><a
+    
href="https://lists.gnu.org/mailman/listinfo/info-gnuastro";>info-gnuastro</a>
+    pour toutes les annonces officielles.</li>
+
+  <li><a 
href="https://lists.gnu.org/mailman/listinfo/help-gnuastro";>help-gnuastro</a>
+    pour contacter les utilisateurs expérimentés et les développeurs de
+    Gnuastro à propos de problèmes d'utilisation, et leur demander conseil
+    (il serait utile que vous lisiez d'abord <a href="manual/">la
+    documentation</a>).</li>
+
+  <li><a 
href="https://lists.gnu.org/mailman/listinfo/bug-gnuastro";>bug-gnuastro</a>
+    pour signaler un bogue ou suggérer de nouvelles fonctions
+    (voir <cite><a href="manual/html_node/Report-a-bug.html">Report a
+    bug</a></cite> et
+    <cite><a href="manual/html_node/Suggest-new-feature.html">Suggest new
+    feature</a></cite> dans la documentation).</li>
+
+  <li><a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-devel";>gnuastro-devel</a>
+    pour discuter du développement (cette liste est surtout destinée aux
+    développeurs de Gnuastro).</li>
+
+  <li><a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-commits";>gnuastro-commits</a>
+    pour annoncer les commits faits dans le dépôt officiel de Gnuastro
+    (sous contrôle de version).</li>
 </ul>
 
-<p>Les rapports de securité qui ne devrait pas rendre public <!-- Original
-text: Security reports that should not be made public --> peut-être envoyer
-directement au <!-- au éditeur ou à l'éditor --> éditeur. S'il n'y a pas
-une réponse à une problème urgent, vous pouvez l'envoyer à la liste de
-distribution <a href="http://lists.gnu.org/mailman/listinfo/security";>securité
-général</a> pour des conseils <!-- original text: You can send it to the
-geneeral security mailing list for advice-->.</p>
-
-
-<h3 id="bug">Signaler un bug</h3>
-<p>La section sur <a href="manual/html_node/Report-a-bug.html"> le signalant 
d'un bug
-  <!-- Original text: The section on reporting a bug --> </a> explique
-  complètement le processus de signaler un bug, lisez cette section s'il
-  vous plait!  please read that section. Pour un summaire,
-  voir <a href="https://savannah.gnu.org/bugs/?group=gnuastro";
-  target="_blank">Les archives des bugs Gnuastro</a>. Cliquez sur
-  "<i>Afficher critère</i>" (au-dessus de la liste), choisez "Any" dans le
-  menu déroulant "<i>Ouvert/Fermé</i>" <!-- original text: 'Open/closed' as
-  in the issues are open to improvement/discussion. Comme les problèmes
-  sont ouvert à discussion ou amélioration --> , et au-dessous
-  "<i>Catégorie</i>" choisez la section de Gnuastro qui correspond à votre
-  bug.  En cliquant sur le bouton "Appliquer", seulement les bugs pertinent
-  se listeront. <!-- original text: Only the relevant bugs will be listed
-  --> . Les points verts ont été résoudu et fermé, alors que les points
-  rouges encore sont ouvert. Si ton bug n'est pas listé, prendez un des
-  mesures suivant.  S'il vous plait, essayez d'être plus descripitif autant
-  que possible et incluez le version de Gnuastro que vous
-  fûtes <!-- original text: include the version of gnu astro that you were
-  using... --> utiliser, ainsi que les commandes ou le code qui a créé le
-  bug donc nous pouvons le recréer et le réparer plus rapide. </p>
+<p>Les rapports sur des problèmes de securité qui ne doivent pas être
+  rendus publics peuvent être envoyés directement au mainteneur. S'il n'y a
+  pas de réponse à une problème urgent, vous pouvez demander conseil sur la
+  liste de diffusion générale dédiée à
+  la <a 
href="https://lists.gnu.org/mailman/listinfo/security";>securité</a>.</p>
+
+
+<h3 id="bug">Signalement de bogues</h3>
+
+<p>La section <cite><a href="manual/html_node/Report-a-bug.html">Report a
+  bug</a></cite> explique en détail la marche à suivre pour signaler un
+  bogue. Lisez cette section s'il vous plaît&nbsp;! En résumé, allez voir
+  en premier lieu
+  les <a href="https://savannah.gnu.org/bugs/?group=gnuastro";
+  target="_blank">archives des bogues de Gnuastro</a>. Cliquez sur
+  <cite>Display Criteria</cite> (au-dessus de la liste), puis dans le menu
+  déroulant <cite>Open/Closed</cite> choisissez <cite>Any</cite>, et
+  dans le menu <cite>Category</cite> choisissez la section de Gnuastro qui
+  correspond à votre bogue . En cliquant sur le bouton <cite>Apply</cite>,
+  seuls les bogues pertinents s'afficheront. Les rubriques en vert sont
+  fermées et correspondent à des bogues résolus, alors que les rubriques
+  en rouge sont toujours ouvertes. Si votre bogue n'est pas dans la liste,
+  choisissez l'une des deux options ci-dessous. Essayez d'être aussi
+  descriptif que possible&nbsp;; indiquez la version de Gnuastro que vous
+  utilisez, ainsi que les commandes ou le code qui ont créé le bogue, pour
+  que nous puissions le reproduire et ainsi le corriger plus rapidement.</p>
 
 <ul>
-  <li><a href="https://savannah.gnu.org/support/?func=additem&group=gnuastro";
-         target="_blank">Envoir votre bug</a> par la page web de gestion du
-         projet principal. C'est le façon recommandé à nous informer de ton
-         bug. S'il vous plait reimplissez le meta-data (catégorie, groupe
-         d'articles, etc) autant que possible.</li>
-  <li> Envoyer le courrier
-  à <a href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>
-  qui est un des <a href="#mail">listes de distribution</a> celles de
-  Gnuastro. <!-- send mail to
-                                                                               
      <emails>
-    which is one of the gnuastro mailing listes --> Ce va être plus
-    lentement comparé à la premiére option. À cause des messages spam en
-    masse, cette liste de distribution est modéré et les autres
-    developpeurs le verraient seulement aprés il est approuvé. Donc, à
-    informer tous les developpeurs immédiatement, utiliser la première
-    option.</li>
+  <li><a 
href="https://savannah.gnu.org/support/?func=additem&amp;group=gnuastro";
+    target="_blank">Soumettez votre bogue</a> sur la page principale de
+    gestion du projet. C'est le méthode que nous recommandons. Remplissez
+    aussi les métadonnées autant que possible (<cite>Category, Item
+    Group,</cite> etc.)</li>
+
+  <li>Écrivez à
+    &lt;<a 
href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>&gt;,
+    qui est l'une des <a href="#mail">listes de diffusion</a> de Gnuastro.
+    Ce sera moins rapide que la première option&nbsp;: à cause du grand
+    nombre de spams, cette liste est modérée et les autres developpeurs ne
+    verront votre message qu'une fois approuvé. Donc, pour informer tous
+    les developpeurs immédiatement, utilisez la première option.</li>
 </ul>
 
 
-<h3 id="contribute">Être Impliqué</h3> <!-- Original Text: Getting Involved -->
+<h3 id="contribute">Participer</h3>
 
-<p>Le plus importante partie de Gnuastro est la capacité, pour tout le
-  monde, à le pirater (ajouter une nouvelle characteristique, changer une
-  préexistant, réparer un problème, ou à comprendre le logiciel lui-même),
-  voir <a href="manual/html_node/Science-and-its-tools.html">La Science et
-  ses outils</a> . Donner s'il vous intereste; c'est encouragé! Il y a un
-  chapitre dédié au
-  <a href="manual/html_node/Developing.html">Développement</a> pour le
-  rendre aussi facile que possible pour vous implique <!-- Original text:
-  There is also a chapter dedicated to developpment to make it as easy as
-  possible to get involved -->. Aussi
-  voir <a href="http://www.gnu.org/help/";>Comment à Aider GNU</a> pour
-  joindre le projet GNU entier.</p>
+<p>Le principe le plus important qui sous-tend Gnuastro est la possibilité
+  pour tout un chacun de le hacker facilement (d'ajouter une nouvelle
+  fonctionnalité, de changer une fonctionnalité préexistante, de corriger
+  un problème, ou de comprendre ce qui se passe sous le capot)&nbsp;; voir
+  <cite><a href="manual/html_node/Science-and-its-tools.html">Science and
+  its tools</a></cite> (la science et ses outils). Vous êtes donc
+  cordialement invité à apporter votre contribution&nbsp;; vous y êtes même
+  vivement encouragé&nbsp;! Un chapitre complet est dédié au
+  <a href="manual/html_node/Developing.html">développement</a> pour que
+  votre participation soit la plus facile possible. Pour rejoindre
+  l'ensemble du projet GNU, allez voir
+  également <a href="/help/help.html">Comment aider GNU</a>.</p>
 
 <dl>
-<dt>Les Sorties Test</dt>
-
-<dd>Essayez les sorties test (quand disponable) pour nous aider, c'est
-apprécié. <!-- Original Text: It's appreciated --> Les Sorties Test sont
-trouvé aux
-<a 
href="http://alpha.gnu.org/gnu/gnuastro/";>http://alpha.gnu.org/gnu/gnuastro/</a>
-(via HTTP) et
-<a 
href="ftp://alpha.gnu.org/gnu/gnuastro/";>ftp://alpha.gnu.org/gnu/gnuastro/</a>
-(via FTP).</dd>
+<dt>Versions de test</dt>
 
+<dd>L'essai de la dernière version de test (quand elle est disponible) est
+  toujours très apprécié. Ces versions se trouvent
+  sur <a 
href="https://alpha.gnu.org/gnu/gnuastro/";>https://alpha.gnu.org/gnu/gnuastro/</a>
+  et <a 
href="ftp://alpha.gnu.org/gnu/gnuastro/";>ftp://alpha.gnu.org/gnu/gnuastro/</a>.
+</dd>
 
 <dt>Développement</dt>
 
-<dd>Les Utilités GNU d'Astronomie est toujours en cours de développement.
-Donc si vous êtez interesté, voir le
-chapitre <a href="manual/html_node/Developing.html">Développement</a> des
-documents et commencer à pirater Gnuastro ou creer tes propres outils. Pour
-les sources
-développement, <a href="https://savannah.gnu.org/bugs/?group=gnuastro";>bug
-trackers</a>, <a href="https://savannah.gnu.org/task/?group=gnuastro";>task
-trackers</a> (les fonctions planifié vont être ajouté), et autre
-information, s'il vous plait voir
-<a href="http://savannah.gnu.org/projects/gnuastro/";>le page de project
-Gnuastro</a> à <a href="http://savannah.gnu.org";>savannah.gnu.org</a>.  Les
-trackers peuvent être un bien point de départ pour le codage.  À rendre
-mise à jour avec le développement de Gnuastro, vous abonner à la liste de
-distribution <a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-devel";>gnuastro-devel</a>,
-et/ou
- <a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-commits";>gnuastro-commits</a>
-.</dd>
-
-<dd>Gnuastro est contrôlé par git avec versions.
-  Les sources contrôlé <a 
href="manual/html_node/Version-controlled-source.html"> par version
-  </a> peut-être
-  <a href="http://git.savannah.gnu.org/cgit/gnuastro.git/tree/";>vu enligne
-  </a>, ou vous pouvez <a 
href="http://git.savannah.gnu.org/cgit/gnuastro.git/log/";> voir le dernier 
histoire</a>.
-  Le cloner pour garder ton propre exemplaire local sur ton système. Utilisez 
une des commandes suivant (Le premier
-  est préféré):
-
-  <pre class="emph-box"><samp>git clone git://git.sv.gnu.org/gnuastro git
-clone http://git.sv.gnu.org/r/gnuastro.git
-</samp></pre></dd>
-
-<dd>Pour configurer et construire le source contrôlé par version, vous allez 
avoir besoin de le
-<a href="manual/html_node/Bootstrapping.html">bootstrap</a> (aussi voir
-<a href="manual/html_node/Bootstrapping-dependencies.html">les dépendance
-de bootstrap</a>).  Voir
-le <a href="manual/html_node/Forking-tutorial.html">tutoriel de fork</a>
-pour une démonstration du workflow du projet Gnuastro</dd>
-
-<dt>Mainteneur</dt>
-
-<dd>Gnuastro etait crée et est maitenant maintenu <!-- Original text: Gnu
-astro was created and is currently maintained by Mohammah--> par
- <a href="https://cral.univ-lyon1.fr/labo/perso/mohammad.akhlaghi/";>Mohammad
-Akhlaghi</a>
-<a href="mailto:akhlaghi=at=gnu.org";>&lt;akhlaghi::at::gnu.org&gt;</a>. La
-traduction en français de cette page est maintenue par Lucas Macquarrie
-<a 
href="mailto:macquarrielucas=at=gmail.com";>&lt;macquarrielucas::at::gmail.com&gt;</a>.
 S'il
-vous plait, utiliser la liste de distribution pour vous entrer en
-contacte. </dd>
-
-
+<dd>Gnuastro est toujours en phase de développement actif. Donc, si cela
+  vous intéresse, jetez un œil au
+  chapitre <cite><a 
href="manual/html_node/Developing.html">Developing</a></cite>
+  de la documentation et commencez à hacker, ou même créez vous-même un
+  programme à l'intérieur de Gnuastro (il y a un modèle pour vous aider).
+  Vous trouverez les sources de développement, les trackers de
+  <a href="https://savannah.gnu.org/bugs/?group=gnuastro";>bogues</a> et de
+  <a href="https://savannah.gnu.org/task/?group=gnuastro";>tâches</a>
+  (fonctionnalités dont l'ajout est prévu), ainsi que d'autres
+  renseignements,
+  sur <a href="https://savannah.gnu.org/projects/gnuastro/";>la page du
+  project Gnuastro</a> (hébergé
+  par <a href="https://savannah.gnu.org";>savannah.gnu.org</a>). Les
+  trackers peuvent être un bon point de départ si vous voulez vous mettre à
+  coder.  Pour vous tenir au courant du développement de Gnuastro,
+  abonnez-vous aux listes de
+  diffusion <a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-devel";>gnuastro-devel</a>,
+  et/ou <a 
href="https://lists.gnu.org/mailman/listinfo/gnuastro-commits";>gnuastro-commits</a>.
+</dd>
+
+<dd>Les versions de Gnuastro sont sous le contrôle de
+  Git. Les <a href="manual/html_node/Version-controlled-source.html">sources
+  sous contrôle de version</a> peuvent
+  être <a href="https://git.savannah.gnu.org/cgit/gnuastro.git/tree/";>examinées
+  en ligne</a>, ainsi que
+  leur <a 
href="https://git.savannah.gnu.org/cgit/gnuastro.git/log/";>historique</a>.
+  Pour les cloner et en garder ainsi un exemplaire local sur votre système,
+  utilisez l'une des commandes suivantes (la première est préférable si
+  elle fonctionne)&nbsp;:
+
+  <pre class="emph-box">
+git clone git://git.sv.gnu.org/gnuastro git
+clone http://git.sv.gnu.org/r/gnuastro.git</pre>
+</dd>
+
+<dd>Pour configurer et compiler les sources sous contrôle de version, vous
+  allez avoir besoin de
+  <a href="manual/html_node/Bootstrapping.html">bootstrap</a> (voir également
+  les <a href="manual/html_node/Bootstrapping-dependencies.html">dépendances
+  de bootstrap</a>). Vous trouverez dans <cite><a
+  href="manual/html_node/Forking-tutorial.html">Forking tutorial</a></cite>
+  la description d'une méthode de travail utilisée par le projet Gnuastro.
+</dd>
+
+<dt>Maintenance</dt>
+
+<dd>Gnuastro a été créé par <a href="http://akhlaghi.org";>Mohammad
+  Akhlaghi</a>
+  &lt;<a 
href="mailto:mohammad=at=akhlaghi.org";>mohammad::at::akhlaghi.org</a>&gt;,
+  qui en assure actuellement la maintenance. Merci d'utiliser les listes de
+  diffusion pour entrer en contact.
+</dd>
 </dl>
 
 
+<h3 id="license">Licence</h3>
 
-
-
-<h3 id="license">Autorisation</h3>
-
-<p>GNU Astronomy Utilities (Gnuastro) est logiciel libre; vous peuvez le
-redistribuer et/ou le modifier selon les termes
-du <a href="http://www.gnu.org/licenses/gpl.html"; rel="license">GNU General
-Public License</a> comme publié par le Fondation du Logiciel Livre (the
-Free Software Foundation); soit version&nbsp;3 de la Licence, ou (si vous
-voulez) une version ultérieure.</p>
+<p><cite>GNU Astronomy Utilities</cite> (Gnuastro) est un logiciel
+  libre&nbsp;; vous pouvez le redistribuer et/ou le modifier selon les
+  termes de la <a href="/licenses/gpl.html" rel="license">licence publique
+  générale GNU</a> telle que publiée par la <cite>Free Software
+  Foundation</cite> (Fondation pour le logiciel libre)&nbsp;; soit en
+  version&nbsp;3 de la licence, soit (à votre convenance) en version
+  ultérieure.</p>
 
 </div><!-- for id="content", starts in the include above -->
-<!--#include virtual="/server/footer.html" -->
+<!--#include virtual="/server/footer.fr.html" -->
 <div id="footer">
 <div class="unprintable">
 
-<p>S'il vous plait envoyer FLL general &amp; Les demandes GNU à
-<a href="mailto:gnu@gnu.org";>&lt;gnu@gnu.org&gt;</a>.  Il y a
-aussi <a href="/contact/">des façons différent pour contacter</a> le
-FLL. Les liens cassé, les autres corrections, ou suggestions peuvent être
-envoyer
-à <a href="mailto:bug-gnuastro@gnu.org";>&lt;bug-gnuastro@gnu.org&gt;</a>.</p>
+<p>Veuillez envoyer les requêtes concernant la FSF et GNU à
+&lt;<a href="mailto:gnu@gnu.org";>gnu@gnu.org</a>&gt;. Il existe
+aussi <a href="/contact/">d'autres moyens de contacter</a> la FSF. Les
+liens orphelins et autres corrections ou suggestions peuvent être signalés
+à
+&lt;<a 
href="mailto:bug-gnuastro=at=gnu.org";>bug-gnuastro::at::gnu.org</a>&gt;.</p>
 
 <p><!-- TRANSLATORS: Ignore the original text in this paragraph,
         replace it with the translation of these two:
@@ -434,21 +361,20 @@ envoyer
         href="/server/standards/README.translations.html">Translations
             README</a>. -->
 
-On travaille fort et faisons de notre mieux pour fournir des traductions
-précis et bonnes qualités.  Cependant, on n'est pas exempt des
-imperfections. S'il vous plait, envoyer vos commentaires et suggestions
-générals à <a href="mailto:web-translators@gnu.org";>
-&lt;web-translators@gnu.org&gt;</a>.</p>
-
-<p>Pour puis d'information à propos du coordination et soumettre des
-traductions de nos cite webs,
-voyez <a href="/server/standards/README.translations.html">Translations
-README</a>.
-
+Nous faisons le maximum pour proposer des traductions fidèles et de bonne
+qualité, mais nous ne sommes pas parfaits. Merci d'adresser vos
+commentaires sur cette page, ainsi que vos suggestions d'ordre général sur
+les traductions, à
+&lt;<a 
href="mailto:web-translators@gnu.org";>web-translators@gnu.org</a>&gt;.</p>
+<p>Pour tout renseignement sur la coordination et la soumission des
+traductions de nos pages web, reportez-vous
+au <a href="/server/standards/README.translations.html">guide de
+traduction</a>.</p>
+</div>
 
 <!-- Regarding copyright, in general, standalone pages (as opposed to
      files generated as part of manuals) on the GNU web server should
-     be under CC BY-ND 3.0 US.  Please do NOT change or remove this
+     be under CC BY-ND 4.0.  Please do NOT change or remove this
      without talking with the webmasters or licensing team first.
      Please make sure the copyright date is consistent with the
      document.  For web pages, it is ok to list just the latest year the
@@ -463,21 +389,27 @@ README</a>.
      There is more detail about copyright years in the GNU Maintainers
      Information document, www.gnu.org/prep/maintain. -->
 
-<p>Copyright &copy; 2015-2016 Free Software Foundation, Inc.</p>
+<p>Copyright &copy; 2015-2017 Free Software Foundation, Inc.</p>
 
-<p>This page is licensed under a <a rel="license"
-href="http://creativecommons.org/licenses/by-nd/3.0/us/";>Creative
-Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
+<p>Cette page peut être utilisée suivant les conditions de la
+licence <a rel="license"
+href="http://creativecommons.org/licenses/by-nd/4.0/deed.fr";>Creative
+Commons attribution, pas de modification, 4.0 internationale (CC BY-ND
+4.0)</a>.</p>
 
-<!--#include virtual="/server/bottom-notes.html" -->
+<!--#include virtual="/server/bottom-notes.fr.html" -->
+<div class="translators-credits">
+Traduction : Lucas MacQuarrie &lt;<a
+href="mailto:macquarrielucas=at=gmail.com";>macquarrielucas::at::gmail.com</a>&gt;
+<br />Révision : &lt;<a
+href="mailto:trad-gnu&#64;april.org";>trad-gnu&#64;april.org</a>&gt;</div>
 
-<p class="unprintable">Updated:
-<!-- timestamp start -->
-$Date: 2016/10/19 09:04:37 $
+<p class="unprintable"><!-- timestamp start -->
+Dernière mise à jour :
+$Date: 2017/11/28 17:58:53 $
 <!-- timestamp end -->
 </p>
 </div>
 </div>
 </body>
 </html>
-<!-- translated by Lucas MacQuarrie macquarrielucas@gmail.com -->
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 868a993..ece2e57 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -818,24 +818,25 @@ was changed.
 
 @cindex Anscombe's quartet
 @cindex Statistical analysis
-Anscombe's quartet
-@footnote{@url{http://en.wikipedia.org/wiki/Anscombe%27s_quartet}}
-demonstrates how four data sets with widely different shapes (when
-plotted) give nearly identical output from standard regression
-techniques.  Anscombe argues that ``Good statistical analysis is not a
-purely routine matter, and generally calls for more than one pass
-through the computer''. Anscombe's quartet can be generalized to say
-that users of a software cannot claim to understand how it works only
-based on the experience they have gained by frequently using it. This
-kind of subjective experience is prone to very serious
-mis-understandings about what it really does behind the scenes and can
-be misleading. This attitude is further encouraged through non-free
-software@footnote{@url{https://www.gnu.org/philosophy/free-sw.html}}.
-This approach to scientific software only helps in producing dogmas
-and an ``obscurantist faith in the expert's special skill, and in his
-personal knowledge and authority''@footnote{Karl Popper. The logic of
-scientific discovery. 1959. Larger quote is given at the start of the
-PDF (for print) version of this book.}.
+@url{http://en.wikipedia.org/wiki/Anscombe%27s_quartet,Anscombe's quartet}
+demonstrates how four data sets with widely different shapes (when plotted)
+give nearly identical output from standard regression techniques. Anscombe
+uses this (now famous) quartet, which was introduced in the paper quoted
+above, to argue that ``Good statistical analysis is not a purely routine
+matter, and generally calls for more than one pass through the
+computer''. Anscombe's quartet can be generalized to say that users of a
+software cannot claim to understand how it works only based on the
+experience they have gained by frequently using it. This kind of subjective
+experience is prone to very serious mis-understandings about the data, what
+the software/statistical-method really does (especially as it gets more
+complicated), and thus the scientific interpretation of the result. This
+attitude is further encouraged through non-free
+software@footnote{@url{https://www.gnu.org/philosophy/free-sw.html}}. This
+approach to scientific software only helps in producing dogmas and an
+``obscurantist faith in the expert's special skill, and in his personal
+knowledge and authority''@footnote{Karl Popper. The logic of scientific
+discovery. 1959. Larger quote is given at the start of the PDF (for print)
+version of this book.}.
 
 @quotation
 @cindex Douglas Rushkoff
@@ -910,16 +911,15 @@ first edition, 2008.}. Science is not independent of its 
tools.
 @cindex Stroustrup, Bjarne
 Bjarne Stroustrup (creator of the C++ language) says: ``Without
 understanding software, you are reduced to believing in magic''.  Ken
-Thomson (the designer or the Unix operating system) says ``I abhor a
-system designed for the `user' if that word is a coded pejorative
-meaning `stupid and unsophisticated'.'' Certainly no scientist (user
-of a scientific software) would want to be considered a believer in
-magic, or `stupid and unsophisticated'. However, this can happen when
-scientists get too distant from the raw data and are mainly indulging
-themselves in their own high-level (abstract) models (creations). For
-example, roughly 5 years before special relativity and about two
-decades before quantum mechanics fundamentally changed Physics, Kelvin
-is quoted as saying:
+Thomson (the designer or the Unix operating system) says ``I abhor a system
+designed for the `user' if that word is a coded pejorative meaning `stupid
+and unsophisticated'.'' Certainly no scientist (user of a scientific
+software) would want to be considered a believer in magic, or `stupid and
+unsophisticated'. However, this can happen when scientists get too distant
+from the raw data and are mainly indulging themselves in their own
+high-level (abstract) models (creations). For example, roughly five years
+before special relativity and about two decades before quantum mechanics
+fundamentally changed Physics, Kelvin is quoted as saying:
 
 @quotation
 @cindex Lord Kelvin
@@ -1577,24 +1577,31 @@ The Japanese Ministry of Science and Technology (MEXT) 
scholarship for
 Mohammad Akhlaghi's Masters and PhD period in Tohoku University
 Astronomical Institute had an instrumental role in the long term learning
 and planning that made the idea of Gnuastro possible. The very critical
-view points of Professor Takashi Ichikawa (from Tohoku University) were
-also instrumental in the initial ideas and creation of Gnuastro. Brandon
-Invergo, Karl Berry and Richard Stallman also provided very useful
-suggestions during the GNU evaluation process. Bob Proulx from Savannah,
-has kindly supported Gnuastro's project webpage on Savannah and the
-management of its version controlled source server there.
+view points of Professor Takashi Ichikawa (Mohammad's adviser) were also
+instrumental in the initial ideas and creation of Gnuastro. The European
+Research Council (ERC) advanced grant 339659-MUSICOS (Principal
+investigator: Roland Bacon) was vital in the growth and expansion of
+Gnuastro, enabling a thorough re-write of the core functionality of all
+libraries and programs, turning Gnuastro into the large collection of
+generic programs and libraries it is today.
 
 @c To the developers: please keep this in the same order as the THANKS file
 @c (alphabetical, except for the names in the paragraph above).
-We would also like to gratefully thank (in alphabetical order by family
-name) Marjan Akbari, Roland Bacon, Nicolas Bouch@'e, Fernando Buitrago,
-Adrian Bunk, Rosa Calvi, Antonio Diaz Diaz, Stephen Hamer, Ra@'ul Infante
-Sainz, Aur@'elien Jarno, Lee Kelvin, Mohammad-Reza Khellat, Alan Lefor,
-Guillaume Mahler, Francesco Montanari, William Pence, Yahya Sefidbakht, Ole
-Streicher, Ignacio Trujillo, David Valls-Gabaud and Christopher Willmer for
-their useful and constructive comments and suggestions. Finally we should
-thank all the (sometimes anonymous) people in various online forums which
-patiently answered all our small (but important) technical questions.
+In general, we would like to gratefully thank the following people for
+their useful and constructive comments and suggestions (in alphabetical
+order by family name): Marjan Akbari, Roland Bacon, Karl Berry, Leindert
+Boogaard, Nicolas Bouch@'e, Fernando Buitrago, Adrian Bunk, Rosa Calvi,
+Benjamin Clement, Antonio Diaz Diaz, Th@'er@`ese Godefroy, Madusha
+Gunawardhana, Stephen Hamer, Takashi Ichikawa, Ra@'ul Infante Sainz,
+Brandon Invergo, Aur@'elien Jarno, Lee Kelvin, Mohammad-Reza Khellat,
+Floriane Leclercq, Alan Lefor, Guillaume Mahler, Francesco Montanari,
+William Pence, Bob Proulx, Yahya Sefidbakht, Alejandro Serrano Borlaff, Lee
+Spitler, Richard Stallman, Ole Streicher, Alfred M. Szmidt, Ignacio
+Trujillo, David Valls-Gabaud and Christopher Willmer. The GNU French
+Translation Team is also managing the French version of the top Gnuastro
+webpage which we highly appreciate. Finally we should thank all the
+(sometimes anonymous) people in various online forums which patiently
+answered all our small (but important) technical questions.
 
 All work on Gnuastro has been voluntary, but the authors are most grateful
 to the following institutions (in chronological order) for hosting us in
@@ -1620,8 +1627,6 @@ Centre de Recherche Astrophysique de Lyon, University of 
Lyon 1, France.@*
 
 
 
-
-
 @node Tutorials, Installation, Introduction, Top
 @chapter Tutorials
 
@@ -2344,7 +2349,7 @@ download and usable by the public. This tutorial was 
first prepared for the
 ``Exploring the Ultra-Low Surface Brightness Universe'' workshop (November
 2017) at the International Space Science Institute (ISSI) in Bern,
 Switzerland. We would like to thank them and the attendees for a very
-fruiteful week.
+fruitful week.
 
 You will need the following tools in this tutorial: Gnuastro, SAO DS9
 @footnote{See @ref{SAO ds9}, available at
@@ -2438,14 +2443,13 @@ $ info gnuastro "Detection options"
 $ info gnuastro "segmentation options"
 @end example
 
-In general, Info is a wonderful and powerfull way to access this whole book
+In general, Info is a wonderful and powerful way to access this whole book
 with detailed information about the programs you are running very fast. If
 you are not already familiar with it, please run the following command and
 just read along and do what it says to learn it. Don't stop until you feel
-have become sufficiently fluent in it. Please invest the half an hour's
-time necessary to start using Info comfortably. It will greatly improve
-your productivity and you will start reaping the rewards of this investment
-very soon.
+sufficiently fluent in it. Please invest the half an hour's time necessary
+to start using Info comfortably. It will greatly improve your productivity
+and you will start reaping the rewards of this investment very soon.
 
 @example
 $ info info
@@ -2483,7 +2487,7 @@ Wide Field Camera} dataset. If you already have them in 
another directory
 be a symbolic link to @file{XDFDIR} with a command like this:
 
 @example
-ln -s XDFDIR download
+$ ln -s XDFDIR download
 @end example
 
 @noindent
@@ -2530,7 +2534,7 @@ will fit the whole dataset in the window. If the window 
is too small,
 expand it with your mouse, then press the ``zoom'' button on the top row of
 buttons above the image, then in the row below it, press ``zoom fit''. You
 can also zoom in and out by scrolling your mouse or the respective
-operation on your touchpad when your cursor/pointer is over the image.
+operation on your touch-pad when your cursor/pointer is over the image.
 
 @example
 $ ds9 download/hlsp_xdf_hst_wfc3ir-60mas_hudf_f160w_v1_sci.fits     \
@@ -2540,7 +2544,7 @@ $ ds9 
download/hlsp_xdf_hst_wfc3ir-60mas_hudf_f160w_v1_sci.fits     \
 The first thing you might notice is that the regions with no data have a
 value of zero in this image. The next thing might be that the dataset
 actually has two ``depth''s (see @ref{Quantifying measurement limits}). The
-exposure time of the inner region is more than 4 times more than the outer
+exposure time of the inner region is more than 4 times of the outer
 parts. Fortunately the XDF survey webpage (above) contains the vertices of
 the deep flat WFC3-IR field. You can use those vertices in @ref{Crop} to
 cutout this deep infra-red region from the larger image. We'll make a
@@ -2588,7 +2592,7 @@ This is the deepest image we currently have of the sky. 
The first thing
 that comes to mind may be this: ``How large is this field?''. Let's find
 the answer to this question with the commands below. The lines starting
 with @code{##} are just comments for you to help in following the steps.
-Don't type them on the terminal. The commands are intentionally repetative
+Don't type them on the terminal. The commands are intentionally repetitive
 in some places to better understand each step and also to demonstrate the
 beauty of command-line features like variables, pipes and loops. Later, if
 you would like to repeat this process on another dataset, you can just use
@@ -2710,19 +2714,124 @@ $ for z in $(seq 0.5 0.1 5); do                        
          \
   done
 @end example
 
-Let's stop for a moment here. CosmicCalculator has a very limited set of
-parameters and it is fast, so, we'll use it to discuss configuration files
-(@ref{Configuration files}). Once you get comfortable with what is done
-below, you can easily do the same for the options of all Gnuastro
-programs. For example, NoiseChisel has the largest number of options in all
-Gnuastro's programs. Therefore configuration files will be very useful for
-it when you use different datasets (with different noise properties).
+If you want a fast result and commonly need such processing for a larger
+number of redshifts, the command above can be slow. This is because the
+CosmicCalculator program has a lot of overhead: it has to parse the
+command-line and all configuration files (see below). These are both
+human-readable characters, not computer-readable bits. CosmicCalculator
+then has to check the sanity of its inputs and check which of its many
+options you have asked for. It has to do all of these for every
+redshift. To greatly speed up the processing, Gnuastro gives you direct
+access to the root work-horse of CosmicCalculator without all that
+overhead: @ref{Gnuastro library}.
+
+Using Gnuastro's library, you can write your own tiny little program for
+this same calculation, without all that extra overhead of CosmicCalculator
+(or any of Gnuastro's programs, see @ref{Library}). For this particular
+job, you want Gnuastro's @ref{Cosmology library}. Here is one example: put
+the following small C program in a file called @file{myprogram.c}.
+
+@example
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <gnuastro/cosmology.h>
+
+int
+main(void)
+@{
+  double area=4.03817;          /* Area of field (arcmin^2). */
+  double z, adist, tandist;     /* Temporary variables.      */
+
+  /* Constants from Plank 2015 (Paper XIII, A&A 594, 2016) */
+  double H0=67.74, olambda=0.6911, omatter=0.3089, oradiation=0;
+
+  /* Do the same thing for all redshifts (z) between 0.1 and 5. */
+  for(z=0.1; z<5; z+=0.1)
+    @{
+      /* Calculate the angular diameter distance. */
+      adist=gal_cosmology_angular_distance(z, H0, olambda,
+                                           omatter, oradiation);
+
+      /* Calculate the tangential distance of one arcsecond. */
+      tandist = adist * 1000 * M_PI / 3600 / 180;
+
+      /* Print the redshift and area. */
+      printf("%-5.2f %g\n", z, pow(tandist * 60,2) * area / 1e6);
+    @}
+
+  /* Tell the system that everything finished successfully. */
+  return EXIT_SUCCESS;
+@}
+@end example
+
+@noindent
+To build and run this C program, you can use @ref{BuildProgram}. It is
+designed to manage Gnuastro's dependencies, compile the program you give it
+and then run it. In short, it hides all the complexities of compiling,
+linking and running C programs based on Gnuastro's library. The library
+will later be usable higher level languages like Python or Julia, for now
+it is only usable by C and C++ programs.
+
+@example
+$ astbuildprog myprogram.c
+@end example
+
+See how much faster this is compared to the shell loop we wrote above? You
+might have noticed that a new file called @file{myprogram} is also created
+in the directory. This is the compiled program that was created and run by
+the command above (its in binary machine code, not human-readable any
+more). You can run it again to get the same results with a command like
+this:
+
+@example
+$ ./myprogram
+@end example
+
+The efficiency of @file{myprogram} compared to CosmicCalculator is because
+the requested processing is faster/comparable to the overheads. For other
+programs that take large input datasets (images for example), the overhead
+is usually negligible compared to the processing. In such cases, the
+libraries are only useful if you want a different/new processing compared
+to the functionalities in Gnuastro's existing programs.
+
+Gnuastro has a large library which all the programs use for various steps
+their processing. For the full list of available functions classified by
+context, please see @ref{Gnuastro library}. Gnuastro's library and
+BuildProgram are created to make it easy for you to use these powerful
+features and get to your scientific results as efficiently (fast) and
+accurately as possible. Several other complete working examples (involving
+images and tables) of Gnuastro's libraries can be see in @ref{Library demo
+programs}. We'll stop with the libraries at this point in this tutorial and
+get back to Gnuastro's already built programs which ready to be used on the
+command-line.
+
+None of Gnuastro's programs keep a default value internally within their
+code. However, when you ran CosmicCalculator with the @option{-z2} option
+above, it completed its processing and printed results. So where did the
+``default'' cosmological parameter values (like the matter density and etc)
+come from?  The values come from the command-line or a configuration file
+(see @ref{Configuration file precedence}).
+
+CosmicCalculator has a very limited set of parameters and doesn't need any
+particular file inputs. Therefore, we'll use it to discuss configuration
+files which are an important part of all Gnuastro's programs (see
+@ref{Configuration files}).
+
+Once you get comfortable with configuration files, you can easily do the
+same for the options of all Gnuastro programs. For example, NoiseChisel has
+the largest number of options in the programs. Therefore configuration
+files will be very useful for it when you use different datasets (with
+different noise properties or in different research contexts). The
+configuration of each program (besides its version) is vital for the
+reproducibility of your results, so it is very important to manage them
+properly.
 
 As we saw above, the full list of the options in all Gnuastro programs can
-be seen with the @option{--help} option. Try using it with the command
-below. Note how options are grouped by context to make it easier to find
-your desired option. However, in each group, options are ordered
-alphabetically.
+be seen with the @option{--help} option. Try calling it with
+CosmicCalculator as shown below. Note how options are grouped by context to
+make it easier to find your desired option. However, in each group, options
+are ordered alphabetically.
 
 @example
 $ astcosmiccal --help
@@ -2732,8 +2841,8 @@ $ astcosmiccal --help
 The options that need a value have an @key{=} sign after their long version
 and @code{FLT}, @code{INT} or @code{STR} for floating point numbers,
 integer numbers and strings (filenames for example) respectively. All
-options have a long format and some have a (single character) short format,
-see @ref{Options}.
+options have a long format and some have a short format (a single
+character), for more see @ref{Options}.
 
 When you are using a program, it is often necessary to check the value the
 option has just before the program starts its processing. In other words,
@@ -2747,21 +2856,16 @@ with @option{--printparams} to see how both do the same 
operation.
 $ astcosmiccal -P
 @end example
 
-None of Gnuastro's programs keep a default value internally. But when you
-ran CosmicCalculator with the @option{-z2} option above, it completed its
-processing. Where did the ``default'' cosmological parameter values come
-from?  The values come from the command-line or a configuration file (see
-@ref{Configuration file precedence}). The highest priority is given to the
-command-line. Let's say you want a different Hubble constant. Try running
-the following command to see how the hubble constant in the output of the
-command above has changed. Then replace the @option{-P} with @option{-z2}
-to confirm the new results.
+Let's say you want a different Hubble constant. Try running the following
+command to see how the Hubble constant in the output of the command above
+has changed. Afterwards, delete the @option{-P} and add a @option{-z2} to
+see the results with the new cosmology (or configuration).
 
 @example
-$ astcosmiccal --H0=70 -P
+$ astcosmiccal -P --H0=70
 @end example
 
-From the output of the @code{--help} option, note how the option for hubble
+From the output of the @code{--help} option, note how the option for Hubble
 constant has both short (@code{-H}) and long (@code{--H0}) formats. One
 final note is that the equal (@key{=}) sign is not mandatory. In the short
 format, the value can stick to the actual option (the short option name is
@@ -2785,11 +2889,14 @@ But having to type these extra options every time you 
run CosmicCalculator
 will be prone to errors (typos in particular) and also will be frustrating
 and slow. Therefore in Gnuastro, you can put all the options and their
 values in a ``Configuration file'' and tell the programs to read the option
-values from there. Create a file named @file{my-cosmology.conf} (or
-@file{my-cosmology.txt}, the suffix doesn't matter) with these lines. One
-space between the option value and name is enough, the values are just
-under each other to help in readability). Also note that you can only use
-long option names in configuration files.
+values from there.
+
+Let's create a configuration file. In your favorite text editor, make a
+file named @file{my-cosmology.conf} (or @file{my-cosmology.txt}, the suffix
+doesn't matter) which contains the following lines. One space between the
+option value and name is enough, the values are just under each other to
+help in readability. Also note that you can only use long option names in
+configuration files.
 
 @example
 H0       70
@@ -2800,7 +2907,8 @@ omatter  0.3
 @noindent
 You can now tell CosmicCalculator to read this file for option values
 immediately using the @option{--config} option as shown below. Do you see
-how the output corresponds to the option values in @file{my-cosmology.txt}?
+how the output of the following command corresponds to the option values in
+@file{my-cosmology.txt} (previous command)?
 
 @example
 $ astcosmiccal --config=my-cosmology.conf -z2
@@ -2811,14 +2919,19 @@ directory, you can benefit from Gnuastro's default 
configuration files to
 avoid having to call the @option{--config} option. Let's assume that you
 want any CosmicCalculator call you make in the @file{my-cosmology}
 directory to use these parameters. You just have to copy the above
-configuration file into a special directory and file. Once you run
-CosmicCalculator, you will see the results implement your desired option
-values without having to type anything extra on the command-line.
+configuration file into a special directory and file:
 
 @example
 $ mkdir my-cosmology
 $ mkdir my-cosmology/.gnuastro
 $ mv my-cosmology.conf my-cosmology/.gnuastro/astcosmiccal.conf
+@end example
+
+Once you run CosmicCalculator within @file{my-cosmology} as shown below,
+you will see how your cosmology has been implemented without having to type
+anything extra on the command-line.
+
+@example
 $ cd my-cosmology
 $ astcosmiccal -z2
 $ cd ..
@@ -2827,14 +2940,15 @@ $ cd ..
 To further simplify the process, you can use the @option{--setdirconf}
 option. If you are already in your desired directory, calling this option
 with the others will automatically write the final values (along with
-descriptions) in @file{.gnuastro/astcosmiccal.conf}. For example this
-command:
+descriptions) in @file{.gnuastro/astcosmiccal.conf}. For example the
+commands below will make the same configuration file automatically (with
+one extra call to CosmicCalculator).
 
 @example
-$ rm -rf my-cosmology         # Make sure the directory doesn't exist.
-$ mkdir my-cosmology
+$ mkdir my-cosmology2
+$ cd my-cosmology2
 $ astcosmiccal --H0 70 --olambda=0.7 --omatter=0.3 --setdirconf
-$ cat .gnuastro/astcosmiccal.conf # See the output configuration file.
+$ astcosmiccal -z2
 $ cd ..
 @end example
 
@@ -2843,26 +2957,32 @@ user (when run in any directory). This allows you to 
set a special behavior
 every time a program is run by a specific user. Only the directory and
 filename differ from the above, the rest of the process is similar to
 before. Finally, there are also system-wide configuration files that can be
-used to define the option values for all users on a system. Please see
-@ref{Configuration file precedence} for where the programs look for default
-user and system wide configuration files.
+used to define the option values for all users on a system. See
+@ref{Configuration file precedence} for a more detailed discussion.
 
 We are now ready to start processing the downloaded images. Since these
 datasets are already aligned, you don't need to align them to make sure the
 pixel grid covers the same region in all inputs. Gnuastro's Warp program
 has features for such pixel-grid warping (see @ref{Warp}). Therefore, just
 for a demonstration, let's assume one image needs to be rotated by 20
-degrees to correspond to the other. To do that, you can run this command:
+degrees to correspond to the other. To do that, you can run the following
+command:
 
 @example
 $ astwarp flat-ir/xdf-f160w.fits --rotate=20
 @end example
 
-Warp can generally be used for any kind of pixel grid manipulation. For
-example the outputs of the commands below will respectively have larger
-pixels (new resolution being one quarter the original resolution), get
-shifted by 2.8 (by sub-pixel), get a shear of 2, and be tilted
-(projected).
+@noindent
+Open the output and see the output. If your final image is already aligned
+with RA and Dec, you can simply use the @option{--align} option and let
+Warp calculate the necessary rotation.
+
+Warp can generally be used for any kind of pixel grid manipulation
+(warping). For example the outputs of the commands below will respectively
+have larger pixels (new resolution being one quarter the original
+resolution), get shifted by 2.8 (by sub-pixel), get a shear of 2, and be
+tilted (projected). After running each, please open the output file and see
+the effect.
 
 @example
 $ astwarp flat-ir/xdf-f160w.fits --scale=0.25
@@ -2872,8 +2992,8 @@ $ astwarp flat-ir/xdf-f160w.fits --project=0.001,0.0005
 @end example
 
 @noindent
-You can also combine multiple warps in one command. For example rotation
-and scaling with the command below.
+You can also combine multiple warps in one command. For example to first
+rotate the image, then scale it, run this command:
 
 @example
 $ astwarp flat-ir/xdf-f160w.fits --rotate=20 --scale=0.25
@@ -2885,9 +3005,9 @@ you see in the matrix that is printed when you run Warp, 
it merges all the
 warps into a single warping matrix (see @ref{Warping basics} and
 @ref{Merging multiple warpings}) and simply applies that just once. Recall
 that since this is done through matrix multiplication, order matters in the
-separate operations. Infact through Warp's @option{--matrix} option, you
-can directly request your desired final rotation and don't have to break it
-up into different warps (see @ref{Invoking astwarp}).
+separate operations. In fact through Warp's @option{--matrix} option, you
+can directly request your desired final warp and don't have to break it up
+into different warps like above (see @ref{Invoking astwarp}).
 
 Fortunately these datasets are already aligned to the same pixel grid, so
 you don't actually need the files that were just generated. You can safely
@@ -2958,7 +3078,7 @@ $ astfits noisechisel/xdf-f160w.fits -h2                  
           \
           | awk '$1=="NUMLABS" @{print $3@}'
 @end example
 
-Grep and AWK are simple, but very powerfull command-line software for
+Grep and AWK are simple, but very powerful command-line software for
 processing text files. Learning them properly can greatly simplify your
 processing, while improve your creativity, productivity and speed. When you
 get time, it is highly recommended to master them. The most common
@@ -3044,7 +3164,7 @@ We can now get back to the curious situation we noticed 
after running
 NoiseChisel: the number of false clumps to find an S/N limit was very small
 (given the extent of this image). This is bad, because we use quantiles in
 NoiseChisel and such a small number will result in a relatively large
-scatter. Since this is a segmenation issue, let's see why this happens with
+scatter. Since this is a segmentation issue, let's see why this happens with
 @option{--checksegmentation}.
 
 @example
@@ -3095,7 +3215,7 @@ false clump S/N. So it is always important to find a good 
balance between a
 larger @option{--minskyfrac} while having a sufficient number of resulting
 clumps (to avoid scatter).
 
-NoiseChisel doesn't just find the labelled pixels, it also finds the Sky
+NoiseChisel doesn't just find the labeled pixels, it also finds the Sky
 value and the Sky standard deviation in the final two extensions of its
 output. To generate a catalog of the colors, we will be using the
 NoiseChisel labeled image from the F160W image. But the Sky and Sky
@@ -3255,8 +3375,8 @@ of NoiseChisel's labeled detection image.
 @cindex GNU AWK
 We'll use the objects catalog in the F160W catalog we generated before for
 the positions and set the other parameters of each profile to be a fixed
-circle of radious 5 pixels (we want all apertures to be fixed
-afterall). AWK is a wonderful tool for such jobs as the command below
+circle of radius 5 pixels (we want all apertures to be fixed
+after all). AWK is a wonderful tool for such jobs as the command below
 shows.
 
 @example
@@ -3370,10 +3490,11 @@ $ parallel astconvertt --fluxlow=-0.001 
--fluxhigh=0.005 --invert      \
 
 You can now easily use your general GUI image viewer to flip through the
 images more easily. On GNOME, you can use the ``Eye of GNOME'' image viewer
-with a command like below and by pressing the @key{<SPACE>} key, you can
-flip through the images and compare them visually more easily. Ofcourse,
-the flux ranges have been chosen generically here for seeing the fainter
-parts. Therefore, brighter objects will be fully black.
+(with executable name of @file{eog}). Run the command below and by pressing
+the @key{<SPACE>} key, you can flip through the images and compare them
+visually more easily. Of course, the flux ranges have been chosen
+generically here for seeing the fainter parts. Therefore, brighter objects
+will be fully black.
 
 @example
 $ eog 1-f105w.jpg
@@ -3710,29 +3831,38 @@ take effect.
 
 @table @asis
 
-@item libtool
+@item GNU Libtool
 @cindex GNU Libtool
-GNU Libtool is a program to simplify managing of the libraries to build an
-executable (program). It is used by @ref{BuildProgram} in Gnuastro to help
-you when you are writing your own C code. It will enable easy linking to
-all the necessary libraries that Gnuastro's library depends on. If GNU
-Libtool isn't present on your system, then BuildProgram won't be built or
-installed. The configure script will look for GNU Libtool through the
-following executable names in your search path @command{libtool} (if it is
-GNU's implementation) or @command{glibtool}.
-
-Libtool is a low-level program that is probably already present on your
-system (and in your operating system package manager). However, if you want
-to install it's latest version from source, please visit its
+Libtool is a program to simplify managing of the libraries to build an
+executable (a program). GNU Libtool has some added functionality compared
+to other implementations. If GNU Libtool isn't present on your system at
+configuration time, a warning will be printed and @ref{BuildProgram} won't
+be built or installed. The configure script will look into your search path
+(@code{PATH}) for GNU Libtool through the following executable names:
+@command{libtool} (acceptable only if it is the GNU implementation) or
+@command{glibtool}. See @ref{Installation directory} for more on
+@code{PATH}.
+
+GNU Libtool (the binary/executable file) is a low-level program that is
+probably already present on your system, and if not, is available in your
+operating system package manager@footnote{Note that we want the
+binary/executable Libtool program which can be run on the command-line. In
+Debian-based operating systems which separate various parts of a package,
+you want want @code{libtool-bin}, the @code{libtool} package won't contain
+the executable program.}. If you want to install GNU Libtool's latest
+version from source, please visit its
 @url{https://www.gnu.org/software/libtool/, webpage}.
 
-Gnuastro's tarball ships with an internal implementation of GNU Libtool and
-it is extensively used while Gnuastro is being built and
-installed. Therefore, you can still build Gnuastro even if you don't have
-GNU Libtool installed on your system. However, this internal Libtool does
-not get installed. Hence, if you want to use BuildProgram to compile and
-link your own C source code later, you need to have GNU Libtool available
-on your system (independent of Gnuastro).
+Gnuastro's tarball is shipped with an internal implementation of GNU
+Libtool. Even if you have GNU Libtool, Gnuastro's internal implementation
+is used for the building and installation of Gnuastro. As a result, you can
+still build, install and use Gnuastro even if you don't have GNU Libtool
+installed on your system. However, this internal Libtool does not get
+installed. Therefore, after Gnuastro's installation, if you want to use
+@ref{BuildProgram} to compile and link your own C source code which uses
+the @ref{Gnuastro library}, you need to have GNU Libtool available on your
+system (independent of Gnuastro). See @ref{Review of library fundamentals}
+to learn more about libraries.
 
 @item libgit2
 @cindex Git
@@ -3760,13 +3890,13 @@ compression and decompression algorithms.
 
 @item GPL Ghostscript
 @cindex GPL Ghostscript
-GPL Ghostscript's executable (@command{gs}) is called used by
-ConvertType to compile a PDF file from a source PostScript file, see
+GPL Ghostscript's executable (@command{gs}) is called by ConvertType to
+compile a PDF file from a source PostScript file, see
 @ref{ConvertType}. Therefore its headers (and libraries) are not
-needed. With a very high probability you already have it in your
-GNU/Linux distribution. Unfortunately it does not follow the standard
-GNU build style so installing it is very hard. It is best to rely on
-your distribution's package managers for this.
+needed. With a very high probability you already have it in your GNU/Linux
+distribution. Unfortunately it does not follow the standard GNU build style
+so installing it is very hard. It is best to rely on your distribution's
+package managers for this.
 
 @end table
 
@@ -4389,74 +4519,6 @@ Do not build or install the program named 
@file{progname}. This is
 very similar to the @option{--enable-progname}, but will build and
 install all the other programs except this one.
 
-@item --enable-bin-op-uint8
-@itemx --enable-bin-op-int8
-@itemx --enable-bin-op-uint16
-@itemx --enable-bin-op-int16
-@itemx --enable-bin-op-uint32
-@itemx --enable-bin-op-int32
-@itemx --enable-bin-op-uint64
-@itemx --enable-bin-op-int64
-@itemx --enable-bin-op-float32
-@itemx --enable-bin-op-float64
-Enable the binary data-structure operators to work natively on the
-respective type of data (@option{u} stands for unsigned types, see
-@ref{Numeric data types}). Some are compiled by default, to disable them
-(or disable any other type), either run @option{enable-bin-op-TYPE=no}, or
-run @option{--disable-bin-op-TYPE}. The final list of enabled/disabled
-types can be inspected in the outputs of @command{./configure} (close to
-the end).
-
-Binary operators, for example @code{+} or @code{>} (greater than), are some
-of the most common operators to the @ref{Arithmetic} program or the
-@code{data_arithmetic} function in @ref{Gnuastro library}. To operate
-most efficiently (as fast as possible without using extra memory or CPU
-resources), it is best to rely on the native types of the input data. For
-example, if you want to add an integer array with a floating point array,
-using the native types, means relying the system's internal type conversion
-for each array element, see @ref{Invoking astarithmetic}. If we don't use
-the native conversion, then the integer array has to be converted to the
-same type as the floating point array to do the conversion. This will
-consume memory (to copy the integer array into a new float array) and CPU
-(integer types need much less processing) resources and ultimately slow
-down the running.
-
-There are many binary operators and in order to have them operate natively
-on of each of the above types, the compiler has to prepare for all the
-different combinations of these types. This can greatly slow down the
-compilation@footnote{It can also greatly increase the file size of the
-library, from a few hundred kilobytes to a few megabytes.} (when you run
-@command{make}). For example, with only one type, @command{make} will
-finish in less than a minute, but if you enable all types, it can take
-roughly half an hour. However, the profits of this one-time investment at
-compilation time will be directly felt (more significantly on large
-images/datasets) each time you run Gnuastro programs or libraries, because
-no internal type conversion will be necessary.
-
-If build time is important for you (mainly developers), disabling shared
-libraries and optimizations (as in @ref{Building and debugging}) is the
-first step to take. If you commonly work with very specific data-types, you
-can enable them (and disable the default types that you don't need) with
-these configuration options. Since the outputs of comparison operators are
-@code{unsigned char} (or @code{uint8_t}) type and most astronomical
-datasets are in single precision (32-bit) floating point (@code{float}),
-the recommended minimum enabled types are @code{uint8} and @code{float32}.
-
-GNU/Linux distribution package managers who compile once, for a large
-audience of users who just download the compiled programs and executables,
-are recommended to enable all types to help their users.
-
-@item --enable-bin-op-alltypes
-Enable native binary arithmetic operation on all types, see the description
-above for the various types for a full discussion. As discussed there,
-enabling all types can greatly speed up arithmetic operations on any
-arbitrary dataset, but will also slow down the building time of
-Gnuastro. Recall that in practice this only affects the @ref{Arithmetic}
-program and the @code{gal_arithmetic} library binary operators, nothing
-else. This option is strongly recommended when you are building Gnuastro to
-be included in a package manager of a GNU/Linux distribution (or other
-operating systems).
-
 @item --enable-gnulibcheck
 @cindex GNU C library
 @cindex Gnulib: GNU Portability Library
@@ -4499,15 +4561,16 @@ is equivalent to simply enabling those that were 
enabled. Listing the
 disabled programs is redundant.
 @end cartouche
 
-Note that the tests of some programs might require other programs to
-have been installed and tested. For example MakeProfiles is the first
-program to be tested when you run @command{$ make check}, it provides
-the inputs to all the other tests. So if you don't install
-MakeProfiles, then the tests for all the other programs will be
-skipped or fail. To avoid this, in one run, you can install all the
-packages and run the tests but not install. If everything is working
-correctly, you can run configure again with only the packages you want
-but not run the tests and directly install after building.
+The tests of some programs might depend on the outputs of the tests of
+other programs. For example MakeProfiles is one the first programs to be
+tested when you run @command{$ make check}. MakeProfiles' test outputs
+(FITS images) are inputs to many other programs (which in turn provide
+inputs for other programs). Therefore, if you don't install MakeProfiles
+for example, the tests for many the other programs will be skipped. To
+avoid this, in one run, you can install all the programs and run the tests
+but not install. If everything is working correctly, you can run configure
+again with only the programs you want. However, don't run the tests and
+directly install after building.
 
 
 
@@ -4544,9 +4607,10 @@ program (an executable file) is to be used a lot, 
specifying all those
 directories will become a significant burden. For example, the @file{ls}
 executable lists the contents in a given directory and it is (usually)
 installed in the @file{/usr/bin/} directory by the operating system
-maintainers. So each time you want to use it you would have to run the
-following command (which is very inconvenient, both in writing and in
-remembering the various directories).
+maintainers. Therefore, if using the full address was the only way to
+access an executable, each time you wanted a listing of a directory, you
+would have to run the following command (which is very inconvenient, both
+in writing and in remembering the various directories).
 
 @example
 $ /usr/bin/ls
@@ -4558,8 +4622,9 @@ To address this problem, we have the @file{PATH} 
environment variable. To
 understand it better, we will start with a short introduction to the shell
 variables. Shell variable values are basically treated as strings of
 characters. For example, it doesn't matter if the value is a name (string
-of @emph{alphabetic} characters) or a number (string of @emph{numeric}
-characters). You can define a variable and a value for it by running
+of @emph{alphabetic} characters), or a number (string of @emph{numeric}
+characters), or both. You can define a variable and a value for it by
+running
 @example
 $ myvariable1=a_test_value
 $ myvariable2="a test value"
@@ -10206,33 +10271,14 @@ for(i=0;i<100;++i) out[i]=a[i]+b[i];
 
 @noindent
 Relying on the default C type conversion significantly speeds up the
-processing and also requires less RAM (when using very large
-images). However this great advantage comes at the cost of preparing for
-all the combinations of types while building/compiling Gnuastro. With the
-full list of CFITSIO types, compilation can take roughly half an
-hour. However, some types are not too common, therefore Gnuastro comes with
-a set of configure time options letting you enable certain types for native
-compilation. You can see the full list of @option{--enable-bin-op-XXXX}
-options in @ref{Gnuastro configure options}.
-
-When a type isn't enabled for native binary operations, the input data will
-be internally converted to the smallest, larger type that was enabled. This
-can slow down your processing (which is faster for smaller/integer types)
-and consume more RAM (to copy the new type), so if you often deal with data
-of a specific types, it is much better to make the one-time investment at
-compilation time and reap the benefits each time you run
-Gnuastro/Arithmetic. Note all arithmetic operations are done by
-@code{gal_data_arithmetic} function in @ref{Gnuastro library}, so the
-choice of native binary operator types will affect any program (within
-Gnuastro or outside of it) that uses this function (including Arithmetic).
+processing and also requires less RAM (when using very large images).
 
 Some operators can only work on integer types (of any length, for example
 bitwise operators) while others only work on floating point types,
 (currently only the @code{pow} operator). In such cases, if the operand
-type(s) are different an error will be printed and internal conversion
-won't occur. Arithmetic also comes with internal type conversion operators
-which you can use to convert the data into the appropriate type, see
-@ref{Arithmetic operators}.
+type(s) are different, an error will be printed. Arithmetic also comes with
+internal type conversion operators which you can use to convert the data
+into the appropriate type, see @ref{Arithmetic operators}.
 
 @cindex Options
 The hyphen (@command{-}) can be used both to specify options (see
@@ -15786,20 +15832,20 @@ $ astmatch [OPTION ...] input-1 input-2
 One line examples:
 
 @example
-## 1D wavelength match (within 5 angestroms) of the two inputs.
+## 1D wavelength match (within 5 angstroms) of the two inputs.
 ## The wavelengths are in the 5th and 10th columns respectively.
 $ astmatch --aperture=5e-10 --ccol1=5 --ccol2=10 in1.fits in2.txt
 
 ## Match the two catalogs with a circular aperture of width 2.
 ## (Units same as given positional columns).
 ## (By default two columns are given for `--ccol1' and `--ccol2',
-##  The number of values to these determines the dimensionality).
+##  The number of values to these determines the dimensions).
 $ astmatch --aperture=2 input1.txt input2.fits
 
 ## Similar to before, but the output is created by merging various
 ## columns from the two inputs: columns 1, RA, DEC from the first
-## input, followed by all columns starting with MAG and the 8th
-## column from second input and finaly the 10th from first input.
+## input, followed by all columns starting with MAG and the BRG
+## column from second input and finally the 10th from first input.
 $ astmatch --aperture=2 input1.txt input2.fits                   \
            --outcols=a1,aRA,aDEC,b/^MAG/,bBRG,a10
 
@@ -15809,7 +15855,7 @@ $ astmatch --aperture=1/3600,2/3600 in1.fits in2.txt
 
 ## Match the RA and DEC columns of the first input with the RA_D
 ## and DEC_D columns of the second within a 0.5 arcseconds aperture.
-$ astmatch --ccol1=RA,DEC --ccol2=RA_D,DEC_D --aperture0.5/3600  \
+$ astmatch --ccol1=RA,DEC --ccol2=RA_D,DEC_D --aperture=0.5/3600  \
            in1.fits in2.fits
 
 ## Match in 3D (RA, Dec and Wavelength).
@@ -15880,7 +15926,7 @@ the second input.
 Another example is given in the one-line examples above. Compared to the
 default case (where two tables with all their columns) are printed, using
 this option is much faster: it will only read and re-arrange the necessary
-columns and it will write a single outputtable. Combined with regular
+columns and it will write a single output table. Combined with regular
 expressions in large tables, this can be a very powerful and convenient way
 to retrieve your desired information and do the match at the same time.
 
@@ -15918,7 +15964,7 @@ The coordinate columns of the second input. See the 
example in
 Parameters of the aperture for matching. The values given to this option
 can be fractions, for example when the position columns are in units of
 degrees, @option{1/3600} can be used to ask for one arcsecond. The
-interpretation of the values depends on the requested dimensionality
+interpretation of the values depends on the requested dimensions
 (determined from @option{--ccol1} and @code{--ccol2}) and how many values
 are given to this option.
 
@@ -18958,9 +19004,10 @@ will be done correctly.
 @cartouche
 @noindent
 @strong{BuildProgram requires GNU Libtool:} BuildProgram depends on GNU
-Libtool, therefore if GNU Libtool isn't available at Gnuastro's configure
-time, BuildProgram will not be built or installed. Please see @ref{Optional
-dependencies} for more information.
+Libtool, other implementations don't have some necessary features. If GNU
+Libtool isn't available at Gnuastro's configure time, you will get a notice
+at the end of the configuration step and BuildProgram will not be built or
+installed. Please see @ref{Optional dependencies} for more information.
 @end cartouche
 
 @menu
@@ -19277,24 +19324,6 @@ of @code{1}, otherwise it will have a value of 
@code{0}. see
 @ref{Implementation of pthread_barrier} for more.
 @end deffn
 
-@deffn Macro GAL_CONFIG_BIN_OP_UINT8
-@deffnx Macro GAL_CONFIG_BIN_OP_INT8
-@deffnx Macro GAL_CONFIG_BIN_OP_UINT16
-@deffnx Macro GAL_CONFIG_BIN_OP_INT16
-@deffnx Macro GAL_CONFIG_BIN_OP_UINT32
-@deffnx Macro GAL_CONFIG_BIN_OP_INT32
-@deffnx Macro GAL_CONFIG_BIN_OP_UINT64
-@deffnx Macro GAL_CONFIG_BIN_OP_INT64
-@deffnx Macro GAL_CONFIG_BIN_OP_FLOAT32
-@deffnx Macro GAL_CONFIG_BIN_OP_FLOAT64
-If binary arithmetic operators were configured for any type, the respective
-macro will have a value of @code{1} (one), otherwise its value will be
-@code{0} (zero). Please see the similar configure-time options in
-@ref{Gnuastro configure options} for a thorough explanation. These are only
-relevant for you if you intend to use the binary operators of
-@ref{Arithmetic on datasets}
-@end deffn
-
 @cindex 32-bit
 @cindex 64-bit
 @cindex bit-32
@@ -19995,7 +20024,7 @@ included by any library header that uses 
@code{gal_data_t}.
 
 @deftp {Type (C @code{struct})} gal_data_t
 The main container for datasets in Gnuastro. It can host data of any
-dimensionality, with any numeric data type. It is actually a structure, but
+dimensions, with any numeric data type. It is actually a structure, but
 @code{typedef}'d as a new type to avoid having to write the @code{struct}
 before any declaration. The actual structure is shown below which is
 followed by a description of each element.
@@ -20096,8 +20125,8 @@ an increment along that dimension becomes larger.
 The total number of elements in the dataset. This is actually a
 multiplication of all the values in the @code{dsize} array, so it is not an
 independent parameter. However, low-level operations with the dataset
-(irrespective of its dimensionality) commonly need this number, so this
-element is designed to avoid calculating it every time.
+(irrespective of its dimensions) commonly need this number, so this element
+is designed to avoid calculating it every time.
 
 @item char *mmapname
 Name of file hosting the @code{mmap}'d contents of @code{array}. If the
@@ -20458,12 +20487,12 @@ single-element dataset.
 An array is a contiguous region of memory.  Hence, at the lowest level,
 every element of an array just has one single-valued position: the number
 of elements that lie between it and the first element in the array. This is
-also known as the @emph{index} of the element within the
-array. Dimensionality is high-level abstraction (meta-data) that we project
+also known as the @emph{index} of the element within the array. A dataset's
+number of dimensions is high-level abstraction (meta-data) that we project
 onto that contiguous patch of memory. When the array is interpreted as a
 one-dimensional dataset, this index is also the @emph{coordinate} of the
-element. But once we associate the patch of memory with a higher
-dimensionality, there must also be one coordinate for each dimension.
+element. But once we associate the patch of memory with a higher dimension,
+there must also be one coordinate for each dimension.
 
 The functions and macros in this section provide you with the tools to
 convert an index into a coordinate and vice-versa along with several other
@@ -21899,13 +21928,13 @@ of rows in the table is also put into the memory that 
@code{numrows} points
 to. The format of the table (e.g., FITS binary or ASCII table) will be put
 in @code{tableformat} (macros defined in @ref{Table input output}).
 
-Note that other than the character strings (column name, units and
-comments), nothing in the data structure(s) will be allocated by this
-function for the actual data (e.g., the @code{array} or @code{dsize}
-elements). This function is just for column information. This is a
-low-level function particular to reading tables in FITS format. It is
-recommended to use @code{gal_table_info} to be generic (see @ref{Table
-input output}).
+This function is just for column information. Therefore it only stores
+meta-data like column name, units and comments. No actual data (contents of
+the columns for example the @code{array} or @code{dsize} elements) will be
+allocated by this function. This is a low-level function particular to
+reading tables in FITS format. To be generic, it is recommended to use
+@code{gal_table_info} which will allow getting information from a variety
+of table formats based on the filename (see @ref{Table input output}).
 @end deftypefun
 
 @deftypefun {gal_data_t *} gal_fits_tab_read (char @code{*filename}, char 
@code{*hdu}, size_t @code{numrows}, gal_data_t @code{*colinfo}, 
gal_list_sizet_t @code{*indexll}, int @code{minmapsize})
@@ -22118,10 +22147,11 @@ also follow those conventions.
 @deffnx Macro GAL_TXT_LINESTAT_BLANK
 @deffnx Macro GAL_TXT_LINESTAT_COMMENT
 @deffnx Macro GAL_TXT_LINESTAT_DATAROW
-Status codes for lines in a plain text file that may be returned by
-@code{gal_txt_line_stat}). Lines which have a @key{#} character as their
+Status codes for lines in a plain text file that are returned by
+@code{gal_txt_line_stat}. Lines which have a @key{#} character as their
 first non-white character are considered to be comments. Lines with nothing
-but white space characters are considered blank.
+but white space characters are considered blank. The remaining lines are
+considered as containing data.
 @end deffn
 
 @deftypefun int gal_txt_line_stat (char @code{*line})
@@ -22136,13 +22166,14 @@ data structures with @code{numcols} elements (one 
data structure for each
 column) see @ref{Arrays of datasets}. The total number of rows in the table
 is also put into the memory that @code{numrows} points to.
 
-Note that other than the character strings (column name, units and
-comments), nothing in the data structure(s) will be allocated by this
-function for the actual data (e.g., the @code{array} or @code{dsize}
-elements). This function is just for column information. This is a
-low-level function particular to reading tables in FITS format. It is
-recommended to use @code{gal_table_info} which will allow getting
-information from a variety of table formats (see @ref{Table input output}).
+This function is just for column information. Therefore it only stores
+meta-data like column name, units and comments. No actual data (contents of
+the columns for example the @code{array} or @code{dsize} elements) will be
+allocated by this function. This is a low-level function particular to
+reading tables in plain text format. To be generic, it is recommended to
+use @code{gal_table_info} which will allow getting information from a
+variety of table formats based on the filename (see @ref{Table input
+output}).
 @end deftypefun
 
 @deftypefun {gal_data_t *} gal_txt_table_read (char @code{*filename}, size_t 
@code{numrows}, gal_data_t @code{*colinfo}, gal_list_sizet_t @code{*indexll}, 
size_t @code{minmapsize})
@@ -22327,9 +22358,9 @@ columns that correspond to that one input, are in order 
of the table (which
 column was read first). So the first requested column is the first popped
 data structure and so on.
 
-if @code{colmatch!=NULL}, it is assumed to be an array that has atleast the
+if @code{colmatch!=NULL}, it is assumed to be an array that has at least the
 same number of elements as nodes in the @code{cols} list. The number of
-columns that matched each input column will be sored in each element.
+columns that matched each input column will be stored in each element.
 @end deftypefun
 
 @cindex Git
@@ -22387,7 +22418,7 @@ When the dataset's type and other information are 
already known, any
 programming language (including C) provides some very good tools for
 various operations (including arithmetic operations like addition) on the
 dataset with a simple loop. However, as an author of a program, making
-assumptions about the type of data, its dimensionality and other basic
+assumptions about the type of data, its dimensions and other basic
 characteristics will come with a large processing burden.
 
 For example if you always read your data as double precision floating
@@ -22610,7 +22641,7 @@ directly use those functions.
 @end deffn
 
 
-@deftypefun {gal_data_t *} gal_arithmetic (int operator, unsigned char flags, 
...)
+@deftypefun {gal_data_t *} gal_arithmetic (int operator, int flags, ...)
 Do the arithmetic operation of @code{operator} on the given operands (the
 third argument and any further argument). Certain special conditions can
 also be specified with the @code{flag} operator. The acceptable values for
@@ -22808,8 +22839,8 @@ to this function are:
 @item tilevalues
 This must be an array that has the same number of elements as the nodes in
 in @code{tilesll} and in the same order that `tilesll' elements are parsed
-(from top to bottom, see @ref{Linked lists}). As a result the
-dimensionality of this array is irrelevant, it will be parsed contiguously.
+(from top to bottom, see @ref{Linked lists}). As a result the array's
+number of dimensions is irrelevant, it will be parsed contiguously.
 
 @item tilesll
 The list of input tiles (see @ref{List of gal_data_t}). Internally, it
@@ -23582,9 +23613,9 @@ Return the permutations that when applied, the first 
@code{nummatched} rows
 of both inputs match with each other (are the nearest within the given
 aperture). The two inputs (@code{coord1} and @code{coord2}) must be
 @ref{List of gal_data_t}. Each @code{gal_data_t} node in the list should be
-a single dimensional dataset (column in a table). The dimensionality of the
+a single dimensional dataset (column in a table). The dimensions of the
 coordinates is determined by the number of @code{gal_data_t} nodes in the
-input lists (which must be equal). Note that the number of rows (or the
+two input lists (which must be equal). Note that the number of rows (or the
 number of elements in each @code{gal_data_t}) in the columns of
 @code{coord1} and @code{coord2} can be different.
 
@@ -23614,7 +23645,7 @@ If internal allocation is necessary and the space is 
larger than
 @code{minmapsize}, the space will be not allocated in the RAM, but in a
 file, see description of @option{--minmapsize} in @ref{Processing options}.
 
-The number of matchs will be put in the space pointed by
+The number of matches will be put in the space pointed by
 @code{nummatched}. If there wasn't any match, this function will return
 @code{NULL}. If match(s) were found, a list with three @code{gal_data_t}
 nodes will be returned. The top two nodes in the list are the permutations
@@ -24841,12 +24872,17 @@ that invested heavily in Python 2.x cannot benefit 
from Python 3.x or
 future versions any more. Some converters are available, but since they are
 automatic, lots of complications might arise in the conversion@footnote{For
 example see @url{https://arxiv.org/abs/1712.00461, Jenness (2017)} which
-describes how LSST is managing the transition.}. If a research project
-begins using Python 3.x today, there is no telling how compatible their
-investments will be when Python 4.x or 5.x will come out. This stems from
-the core principles of Python, which are very useful when you look in the
-`on the go' basis as described before and not future usage. Future-proof
-code (as long as current operating systems will be used) is written in C.
+describes how LSST is managing the transition.}.
+
+If a research project begins using Python 3.x today, there is no telling
+how compatible their investments will be when Python 4.x or 5.x will come
+out. This stems from the core principles of Python, which are very useful
+when you look in the `on the go' basis as described before and not future
+usage. Reproducibility (ability to run the code in the future) is a core
+principal of any scientific result, or the software that produced that
+result. Rebuilding all the dependencies of a software in an obsolete
+language is not easy. Future-proof code (as long as current operating
+systems will be used) is written in C.
 
 The portability of C is best demonstrated by the fact that both C++ and
 Python are part of the C-family of programming languages which also include
@@ -24903,7 +24939,7 @@ functions, it is explained in the comments in between 
the code.
 @cindex GNU Coreutils
 All the Gnuastro programs provide very low level and modular operations
 (modeled on GNU Coreutils). Almost all the basic command-line programs like
-@command{ls}, @command{cp} or @command{rm} on GNU/Linux operting systems
+@command{ls}, @command{cp} or @command{rm} on GNU/Linux operating systems
 are part of GNU Coreutils. This enables you to use shell scripting
 languages (for example GNU Bash) to operate on a large number of files or
 do very complex things through the creative combinations of these tools
diff --git a/doc/gnuastro.translist b/doc/gnuastro.translist
new file mode 100644
index 0000000..6bec9f7
--- /dev/null
+++ b/doc/gnuastro.translist
@@ -0,0 +1,12 @@
+<!-- begin translist file -->
+<!--#set var="TRANSLATION_LIST"
+value='<div id="translations">
+<p>
+<span dir="ltr" class="original"><a lang="en" hreflang="en" 
href="index.html">English</a>&nbsp;[en]</span> &nbsp;
+<span dir="ltr"><a lang="fr" hreflang="fr" 
href="gnuastro.fr.html">français</a>&nbsp;[fr]</span> &nbsp;
+</p>
+</div>' -->
+<link rel="alternate" type="text/html" href="index.html" hreflang="x-default" 
/>
+<link rel="alternate" type="text/html" lang="en" hreflang="en" 
href="index.html" title="English" />
+<link rel="alternate" type="text/html" lang="fr" hreflang="fr" 
href="gnuastro.fr.html" title="français" />
+<!-- end translist file -->
diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt
index 8411dfa..e771da1 100644
--- a/doc/release-checklist.txt
+++ b/doc/release-checklist.txt
@@ -25,15 +25,13 @@ all the commits needed for this release have been completed.
    `doc/announce-acknowledge.txt' in them.
 
 
- - [STABLE] Correct the links in the webpage (`doc/gnuastro-top.html' and
+ - [STABLE] Correct the links in the webpage (`doc/gnuastro.en.html' and
    `doc/gnuastro.fr.html').
 
 
  - Run the following commands to keep the list of people who contributed
    code and those that must be acknowledged for the announcement (`P.P' is
-   the previous version). Finally, if in a stable release, clean
-   `doc/announce-acknowledge.txt' for the next release. We will use
-   `~/people.txt' in the announcement.
+   the previous version).
 
      $ git shortlog gnuastro_vP.P...HEAD --numbered --summary > ~/people.txt
      $ cat doc/announce-acknowledge.txt >> ~/people.txt
@@ -43,6 +41,7 @@ all the commits needed for this release have been completed.
             > doc/announce-acknowledge.txt
 
 
+
  - Commit all these changes:
 
      $ git add -u
@@ -88,16 +87,20 @@ all the commits needed for this release have been completed.
    uses `ncftpput' which comes with the `ncftp' package. The replaces
    are necessary for the symbolic links.
 
+   - Set the key-ID as a variable for easy steps later:
+
+       $ mykeyid=1849814357EFB73A
+
    - For an alpha upload:
 
        $  /path/to/gnulib/build-aux/gnupload --to alpha.gnu.org:gnuastro   \
                --replace --symlink-regex="s/X.X.XXX-XXXX/alpha-latest/"    \
-               gnuastro-X.X.XXX-XXXX.tar.lz
+               --user $mykeyid gnuastro-X.X.XXX-XXXX.tar.lz
 
    - For a stable release:
 
        $  /path/to/gnulib/build-aux/gnupload --to ftp.gnu.org:gnuastro     \
-               --replace --symlink-regex                                   \
+               --replace --symlink-regex --user $mykeyid                   \
                gnuastro-X.X.tar.gz gnuastro-X.X.tar.lz
 
 
@@ -136,7 +139,7 @@ all the commits needed for this release have been completed.
      $ cd build
      $ /path/to/gnulib/build-aux/announce-gen --release-type=XXXX          \
               --package-name=gnuastro --previous-version=0.1               \
-              --current-version=0.2 --gpg-key-id=16A8A4B2AEC42AFF          \
+              --current-version=0.2 --gpg-key-id=$mykeyid                  \
               --url-directory=http://YYYY.gnu.org/gnu/gnuastro             \
               --archive-suffix=tar.lz > announcement.txt
 
@@ -145,6 +148,9 @@ all the commits needed for this release have been completed.
    contents of `~/people.txt' to the announcement.
 
 
+ - Add the size of the files (in mega-bytes) to the announcement.
+
+
  - Run a spell-check on the announcement and remove `~/people.txt'.
 
      $ rm ~/people.txt
@@ -171,8 +177,8 @@ Steps necessary to Package Gnuastro for Debian.
    do that, you can update the `/etc/apt/sources.list' file. You can get
    the current releases from this webpage:
    http://ftp.debian.org/debian/. See which release is currently the
-   `testing' release and use replace its name with the one that is
-   currently present in that file. Afterwards, run these commands:
+   `testing' release and replace its name with the one that is currently
+   present in that file. Afterwards, run these commands:
 
      $ sudo apt-get update
      $ sudo apt-get upgrade
@@ -234,7 +240,7 @@ Steps necessary to Package Gnuastro for Debian.
      $ git add --all
      $ git commit -m "Upstream Gnuastro $ver"
      $ git tag upstream/$ver
-     $ pristine-tar commit ../gnuastro_$ver.orig.tar.gz
+     $ pristine-tar -s commit ../gnuastro_$ver.orig.tar.gz
 
 
  - We are done with the `upstream' and `pristine-tar' branches and can
@@ -271,9 +277,14 @@ Steps necessary to Package Gnuastro for Debian.
 
    IMPORTANT: An official release should have `unstable' after the
    version. But if you just want to make sure Gnuastro builds on all
-   systems, it should be `experimental'. If it is experimental, also add
-   this line in `debian/changelog': "Switch to experimental to prepare
-   transition".
+   systems for testing, it should be `experimental'.
+
+   When changing the state (from experimental to unstable or vice versa)
+   add the following line in `debian/changelog' (this is necessary to avoid
+   Lintian warnings):
+
+   Experimental -> Unstable: "Switch to unstable for upstream stable release"
+   Unstable -> Experimental: "Switch to experimental to prepare transition".
 
 
  - Update your version of `pbuilder':
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 94319df..0bef380 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -51,11 +51,15 @@ libgnuastro_la_LIBADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la
 
 
 # Specify the library .c files
-libgnuastro_la_SOURCES = arithmetic.c arithmetic-binary.c                \
-  arithmetic-onlyint.c binary.c blank.c box.c checkset.c convolve.c      \
-  cosmology.c data.c fits.c git.c interpolate.c list.c match.c options.c \
-  permutation.c polygon.c qsort.c dimension.c statistics.c table.c       \
-  tableintern.c threads.c tile.c timing.c txt.c type.c wcs.c
+libgnuastro_la_SOURCES = arithmetic.c arithmetic-and.c arithmetic-bitand.c \
+  arithmetic-bitlsh.c arithmetic-bitor.c arithmetic-bitrsh.c               \
+  arithmetic-bitxor.c arithmetic-divide.c arithmetic-eq.c arithmetic-ge.c  \
+  arithmetic-gt.c arithmetic-le.c arithmetic-lt.c arithmetic-minus.c       \
+  arithmetic-modulo.c arithmetic-multiply.c arithmetic-ne.c                \
+  arithmetic-or.c arithmetic-plus.c binary.c blank.c box.c checkset.c      \
+  convolve.c cosmology.c data.c fits.c git.c interpolate.c list.c match.c  \
+  options.c permutation.c polygon.c qsort.c dimension.c statistics.c       \
+  table.c tableintern.c threads.c tile.c timing.c txt.c type.c wcs.c
 
 
 
@@ -85,12 +89,21 @@ pkginclude_HEADERS = gnuastro/config.h 
$(headersdir)/arithmetic.h         \
 # will not distributed, so we need to explicitly tell Automake to
 # distribute them here.
 internaldir=$(top_srcdir)/lib/gnuastro-internal
-EXTRA_DIST = gnuastro.pc.in $(headersdir)/README $(internaldir)/README    \
-  $(internaldir)/arithmetic-binary.h $(internaldir)/arithmetic-internal.h \
-  $(internaldir)/arithmetic-onlyint.h $(internaldir)/checkset.h           \
-  $(internaldir)/commonopts.h $(internaldir)/config.h.in                  \
-  $(internaldir)/fixedstringmacros.h $(internaldir)/options.h             \
-  $(internaldir)/tableintern.h $(internaldir)/timing.h
+EXTRA_DIST = gnuastro.pc.in $(headersdir)/README $(internaldir)/README  \
+  $(internaldir)/arithmetic-and.h $(internaldir)/arithmetic-binary.h    \
+  $(internaldir)/arithmetic-bitand.h $(internaldir)/arithmetic-bitlsh.h \
+  $(internaldir)/arithmetic-bitor.h $(internaldir)/arithmetic-bitrsh.h  \
+  $(internaldir)/arithmetic-bitxor.h $(internaldir)/arithmetic-divide.h \
+  $(internaldir)/arithmetic-eq.h $(internaldir)/arithmetic-ge.h         \
+  $(internaldir)/arithmetic-gt.h $(internaldir)/arithmetic-internal.h   \
+  $(internaldir)/arithmetic-le.h $(internaldir)/arithmetic-lt.h         \
+  $(internaldir)/arithmetic-minus.h $(internaldir)/arithmetic-modulo.h  \
+  $(internaldir)/arithmetic-multiply.h $(internaldir)/arithmetic-ne.h   \
+  $(internaldir)/arithmetic-or.h $(internaldir)/arithmetic-plus.h       \
+  $(internaldir)/checkset.h $(internaldir)/commonopts.h                 \
+  $(internaldir)/config.h.in $(internaldir)/fixedstringmacros.h         \
+  $(internaldir)/options.h $(internaldir)/tableintern.h                 \
+  $(internaldir)/timing.h
 
 
 
@@ -115,16 +128,6 @@ gnuastro/config.h: Makefile $(internaldir)/config.h.in
               -e 's|@HAVE_LIBGIT2[@]|$(HAVE_LIBGIT2)|g'                  \
               -e 's|@HAVE_WCSLIB_VERSION[@]|$(HAVE_WCSLIB_VERSION)|g'    \
               -e 's|@HAVE_PTHREAD_BARRIER[@]|$(HAVE_PTHREAD_BARRIER)|g'  \
-              -e 's|@HAVE_BIN_OP_UINT8[@]|$(HAVE_BIN_OP_UINT8)|g'        \
-              -e 's|@HAVE_BIN_OP_INT8[@]|$(HAVE_BIN_OP_INT8)|g'          \
-              -e 's|@HAVE_BIN_OP_UINT16[@]|$(HAVE_BIN_OP_UINT16)|g'      \
-              -e 's|@HAVE_BIN_OP_INT16[@]|$(HAVE_BIN_OP_INT16)|g'        \
-              -e 's|@HAVE_BIN_OP_UINT32[@]|$(HAVE_BIN_OP_UINT32)|g'      \
-              -e 's|@HAVE_BIN_OP_INT32[@]|$(HAVE_BIN_OP_INT32)|g'        \
-              -e 's|@HAVE_BIN_OP_UINT64[@]|$(HAVE_BIN_OP_UINT64)|g'      \
-              -e 's|@HAVE_BIN_OP_INT64[@]|$(HAVE_BIN_OP_INT64)|g'        \
-              -e 's|@HAVE_BIN_OP_FLOAT32[@]|$(HAVE_BIN_OP_FLOAT32)|g'    \
-              -e 's|@HAVE_BIN_OP_FLOAT64[@]|$(HAVE_BIN_OP_FLOAT64)|g'    \
               -e 's|@SIZEOF_LONG[@]|$(SIZEOF_LONG)|g'                    \
               -e 's|@SIZEOF_SIZE_T[@]|$(SIZEOF_SIZE_T)|g'                \
               -e 's|@RESTRICT_REPLACEMENT[@]|$(RESTRICT_REPLACEMENT)|g'  \
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-and.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-and.c
index 16c36e2..aedc84a 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-and.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_and(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, && );
+}
diff --git a/lib/arithmetic-binary.c b/lib/arithmetic-binary.c
deleted file mode 100644
index c5facc8..0000000
--- a/lib/arithmetic-binary.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/*********************************************************************
-Arithmetic operations on data structures.
-This is part of GNU Astronomy Utilities (Gnuastro) package.
-
-Original author:
-     Mohammad Akhlaghi <akhlaghi@gnu.org>
-Contributing author(s):
-Copyright (C) 2016, Free Software Foundation, Inc.
-
-Gnuastro is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation, either version 3 of the License, or (at your
-option) any later version.
-
-Gnuastro is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
-**********************************************************************/
-#include <config.h>
-
-#include <stdio.h>
-#include <errno.h>
-#include <error.h>
-#include <stdlib.h>
-
-#include <gnuastro/blank.h>
-#include <gnuastro/arithmetic.h>
-
-#include <gnuastro-internal/arithmetic-internal.h>
-
-
-
-
-
-/************************************************************************/
-/*************            Native type macros            *****************/
-/************************************************************************/
-#if GAL_CONFIG_BIN_OP_UINT8 == 1
-#define BINARY_LT_IS_UINT8                                         \
-  case GAL_TYPE_UINT8: BINARY_LT_SET(uint8_t);          break;
-#define BINARY_LT_SET_RT_IS_UINT8(LT)                              \
-  case GAL_TYPE_UINT8: BINARY_RT_LT_SET(uint8_t, LT);   break;
-#else
-#define BINARY_LT_IS_UINT8
-#define BINARY_LT_SET_RT_IS_UINT8(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT8 == 1
-#define BINARY_LT_IS_INT8                                          \
-  case GAL_TYPE_INT8: BINARY_LT_SET(int8_t);            break;
-#define BINARY_LT_SET_RT_IS_INT8(LT)                               \
-  case GAL_TYPE_INT8: BINARY_RT_LT_SET(int8_t, LT);     break;
-#else
-#define BINARY_LT_IS_INT8
-#define BINARY_LT_SET_RT_IS_INT8(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT16 == 1
-#define BINARY_LT_IS_UINT16                                        \
-  case GAL_TYPE_UINT16: BINARY_LT_SET(uint16_t);        break;
-#define BINARY_LT_SET_RT_IS_UINT16(LT)                             \
-  case GAL_TYPE_UINT16: BINARY_RT_LT_SET(uint16_t, LT); break;
-#else
-#define BINARY_LT_IS_UINT16
-#define BINARY_LT_SET_RT_IS_UINT16(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT16 == 1
-#define BINARY_LT_IS_INT16                                         \
-  case GAL_TYPE_INT16: BINARY_LT_SET(int16_t);          break;
-#define BINARY_LT_SET_RT_IS_INT16(LT)                              \
-  case GAL_TYPE_INT16: BINARY_RT_LT_SET(int16_t, LT);   break;
-#else
-#define BINARY_LT_IS_INT16
-#define BINARY_LT_SET_RT_IS_INT16(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT32 == 1
-#define BINARY_LT_IS_UINT32                                        \
-  case GAL_TYPE_UINT32: BINARY_LT_SET(uint32_t);        break;
-#define BINARY_LT_SET_RT_IS_UINT32(LT)                             \
-  case GAL_TYPE_UINT32: BINARY_RT_LT_SET(uint32_t, LT); break;
-#else
-#define BINARY_LT_IS_UINT32
-#define BINARY_LT_SET_RT_IS_UINT32(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT32 == 1
-#define BINARY_LT_IS_INT32                                         \
-  case GAL_TYPE_INT32: BINARY_LT_SET(int32_t);          break;
-#define BINARY_LT_SET_RT_IS_INT32(LT)                              \
-  case GAL_TYPE_INT32: BINARY_RT_LT_SET(int32_t, LT);   break;
-#else
-#define BINARY_LT_IS_INT32
-#define BINARY_LT_SET_RT_IS_INT32(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT64 == 1
-#define BINARY_LT_IS_UINT64                                        \
-  case GAL_TYPE_UINT64: BINARY_LT_SET(uint64_t);        break;
-#define BINARY_LT_SET_RT_IS_UINT64(LT)                             \
-  case GAL_TYPE_UINT64: BINARY_RT_LT_SET(uint64_t, LT); break;
-#else
-#define BINARY_LT_IS_UINT64
-#define BINARY_LT_SET_RT_IS_UINT64(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT64 == 1
-#define BINARY_LT_IS_INT64                                         \
-  case GAL_TYPE_INT64: BINARY_LT_SET(int64_t);          break;
-#define BINARY_LT_SET_RT_IS_INT64(LT)                              \
-  case GAL_TYPE_INT64: BINARY_RT_LT_SET(int64_t, LT);   break;
-#else
-#define BINARY_LT_IS_INT64
-#define BINARY_LT_SET_RT_IS_INT64(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_FLOAT32 == 1
-#define BINARY_LT_IS_FLOAT32                                       \
-  case GAL_TYPE_FLOAT32: BINARY_LT_SET(float);          break;
-#define BINARY_LT_SET_RT_IS_FLOAT32(LT)                            \
-  case GAL_TYPE_FLOAT32: BINARY_RT_LT_SET(float, LT);   break;
-#else
-#define BINARY_LT_IS_FLOAT32
-#define BINARY_LT_SET_RT_IS_FLOAT32(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_FLOAT64 == 1
-#define BINARY_LT_IS_FLOAT64                                       \
-  case GAL_TYPE_FLOAT64: BINARY_LT_SET(double);         break;
-#define BINARY_LT_SET_RT_IS_FLOAT64(LT)                            \
-  case GAL_TYPE_FLOAT64: BINARY_RT_LT_SET(double, LT);  break;
-#else
-#define BINARY_LT_IS_FLOAT64
-#define BINARY_LT_SET_RT_IS_FLOAT64(LT)
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*************              High level macros           *****************/
-/************************************************************************/
-/* Final step to be used by all operators and all types. */
-#define BINARY_OP_OT_RT_LT_SET(OP, OT, RT, LT) {                        \
-    LT lb, *la=l->array;                                                \
-    RT rb, *ra=r->array;                                                \
-    OT ob, *oa=o->array, *of=oa + o->size;                              \
-    if(checkblank)                                                      \
-      {                                                                 \
-        gal_blank_write(&lb, l->type);                                  \
-        gal_blank_write(&rb, r->type);                                  \
-        gal_blank_write(&ob, o->type);                                  \
-        do                                                              \
-          {                                                             \
-            if(lb==lb && rb==rb)/* Both are integers.                */ \
-              *oa = (*la!=lb  && *ra!=rb)  ? *la OP *ra : ob ;          \
-            else if(lb==lb)     /* Only left operand is an integer.  */ \
-              *oa = (*la!=lb  && *ra==*ra) ? *la OP *ra : ob;           \
-            else                /* Only right operand is an integer. */ \
-              *oa = (*la==*la && *ra!=rb)  ? *la OP *ra : ob;           \
-            if(l->size>1) ++la;                                         \
-            if(r->size>1) ++ra;                                         \
-          }                                                             \
-        while(++oa<of);                                                 \
-      }                                                                 \
-    else                                                                \
-      {                                                                 \
-        if(l->size==r->size) do *oa = *la++ OP *ra++; while(++oa<of);   \
-        else if(l->size==1)  do *oa = *la   OP *ra++; while(++oa<of);   \
-        else                 do *oa = *la++ OP *ra;   while(++oa<of);   \
-      }                                                                 \
-  }
-
-
-
-
-/* This is for operators like `&&' and `||', where the right operator is
-   not necessarily read (and thus incremented). */
-#define BINARY_OP_INCR_OT_RT_LT_SET(OP, OT, RT, LT) {                   \
-    LT *la=l->array;                                                    \
-    RT *ra=r->array;                                                    \
-    OT *oa=o->array, *of=oa + o->size;                                  \
-    if(l->size==r->size) do {*oa = *la++ OP *ra; ++ra;} while(++oa<of); \
-    else if(l->size==1)  do {*oa = *la   OP *ra; ++ra;} while(++oa<of); \
-    else                 do  *oa = *la++ OP *ra;        while(++oa<of); \
-  }
-
-
-
-
-
-/* For operators whose type may be any of the given inputs. */
-#define BINARY_OP_RT_LT_SET(OP, RT, LT)                            \
-  if(o->type==l->type)                                             \
-    BINARY_OP_OT_RT_LT_SET(OP, LT, RT, LT)                         \
-  else                                                             \
-    BINARY_OP_OT_RT_LT_SET(OP, RT, RT, LT)
-
-
-
-
-
-/* Left and right types set, choose what to do based on operator. */
-#define BINARY_RT_LT_SET(RT, LT)                                    \
-  switch(operator)                                                  \
-    {                                                               \
-    case GAL_ARITHMETIC_OP_PLUS:                                    \
-      BINARY_OP_RT_LT_SET(          +, RT, LT);                     \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_MINUS:                                   \
-      BINARY_OP_RT_LT_SET(          -, RT, LT);                     \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_MULTIPLY:                                \
-      BINARY_OP_RT_LT_SET(          *, RT, LT);                     \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_DIVIDE:                                  \
-      BINARY_OP_RT_LT_SET(          /, RT, LT);                     \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_LT:                                      \
-      BINARY_OP_OT_RT_LT_SET(       <, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_LE:                                      \
-      BINARY_OP_OT_RT_LT_SET(      <=, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_GT:                                      \
-      BINARY_OP_OT_RT_LT_SET(       >, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_GE:                                      \
-      BINARY_OP_OT_RT_LT_SET(      >=, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_EQ:                                      \
-      BINARY_OP_OT_RT_LT_SET(      ==, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_NE:                                      \
-      BINARY_OP_OT_RT_LT_SET(      !=, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_AND:                                     \
-      BINARY_OP_INCR_OT_RT_LT_SET( &&, uint8_t, RT, LT);            \
-      break;                                                        \
-    case GAL_ARITHMETIC_OP_OR:                                      \
-      BINARY_OP_INCR_OT_RT_LT_SET( ||, uint8_t, RT, LT);            \
-      break;                                                        \
-    default:                                                        \
-      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized", \
-            "BINARY_RT_LT_SET", operator);                          \
-    }
-
-
-
-
-
-
-/* Left operand type set, see what the right operand type is. */
-#define BINARY_LT_SET(LT)                                          \
-  switch(r->type)                                                  \
-    {                                                              \
-      BINARY_LT_SET_RT_IS_UINT8(LT);                               \
-      BINARY_LT_SET_RT_IS_INT8(LT);                                \
-      BINARY_LT_SET_RT_IS_UINT16(LT);                              \
-      BINARY_LT_SET_RT_IS_INT16(LT);                               \
-      BINARY_LT_SET_RT_IS_UINT32(LT);                              \
-      BINARY_LT_SET_RT_IS_INT32(LT);                               \
-      BINARY_LT_SET_RT_IS_UINT64(LT);                              \
-      BINARY_LT_SET_RT_IS_INT64(LT);                               \
-      BINARY_LT_SET_RT_IS_FLOAT32(LT);                             \
-      BINARY_LT_SET_RT_IS_FLOAT64(LT);                             \
-    default:                                                       \
-      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",    \
-            "BINARY_LT_SET", r->type);                             \
-    }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*************              Top level function          *****************/
-/************************************************************************/
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro)
-{
-  /* Read the variable arguments. `lo' and `ro' keep the original data, in
-     case their type isn't built (based on configure options are configure
-     time). */
-  int checkblank;
-  int32_t otype, final_otype;
-  size_t out_size, minmapsize;
-  gal_data_t *l, *r, *o=NULL, *tmp_o;
-
-
-  /* Simple sanity check on the input sizes */
-  if( !( (flags & GAL_ARITHMETIC_NUMOK) && (lo->size==1 || ro->size==1))
-      && gal_data_dsize_is_different(lo, ro) )
-    error(EXIT_FAILURE, 0, "%s: the non-number inputs to %s don't have the "
-          "same dimension/size", __func__,
-          gal_arithmetic_operator_string(operator));
-
-
-  /* Set the final output type (independent of which types are
-     compiled). These needs to be done before the call to
-     `gal_arithmetic_convert_to_compiled_type', because that function can
-     free the space of the original data structures, thus we will loose the
-     original data structure information. */
-  final_otype=gal_arithmetic_binary_out_type(operator, lo, ro);
-
-
-  /* Make sure the input arrays have one of the compiled types. From this
-     point on, until the cleaning up section of this function, we won't be
-     using the `lo' and `ro' pointers. */
-  l=gal_arithmetic_convert_to_compiled_type(lo, flags);
-  r=gal_arithmetic_convert_to_compiled_type(ro, flags);
-
-
-  /* Set the output type. For the comparison operators, the output type is
-     either 0 or 1, so we will set the output type to `unsigned char' for
-     efficient memory and CPU usage. Since the number of operators without
-     a fixed output type (like the conditionals) is less, by `default' we
-     will set the output type to `unsigned char', and if any of the other
-     operatrs are given, it will be chosen based on the input types.*/
-  otype=gal_arithmetic_binary_out_type(operator, l, r);
-
-
-  /* Set the output sizes. */
-  minmapsize = ( l->minmapsize < r->minmapsize
-                 ? l->minmapsize : r->minmapsize );
-  out_size = l->size > r->size ? l->size : r->size;
-
-
-  /* If we want inplace output, set the output pointer to one input. Note
-     that the output type can be different from both inputs.  */
-  if(flags & GAL_ARITHMETIC_INPLACE)
-    {
-      if     (l->type==otype && out_size==l->size)   o = l;
-      else if(r->type==otype && out_size==r->size)   o = r;
-    }
-
-
-  /* If the output pointer was not set for any reason, allocate it. For
-     `mmapsize', note that since its `size_t', it will always be
-     Positive. The `-1' that is recommended to give when you want the value
-     in RAM is actually the largest possible memory location. So we just
-     have to choose the smaller minmapsize of the two to decide if the
-     output array should be in RAM or not. */
-  if(o==NULL)
-    o = gal_data_alloc(NULL, otype,
-                       l->size>1 ? l->ndim  : r->ndim,
-                       l->size>1 ? l->dsize : r->dsize,
-                       l->size>1 ? l->wcs   : r->wcs,
-                       0, minmapsize, NULL, NULL, NULL );
-
-
-  /* See if we should check for blanks. When both types are floats, blanks
-     don't need to be checked (the floating point standard will do the job
-     for us). It is also not necessary to check blanks in bitwise
-     operators, but bitwise operators have their own macro
-     (`BINARY_OP_INCR_OT_RT_LT_SET') which doesn' use `checkblanks'.*/
-  checkblank = ((((l->type!=GAL_TYPE_FLOAT32    && l->type!=GAL_TYPE_FLOAT64)
-                  || (r->type!=GAL_TYPE_FLOAT32 && r->type!=GAL_TYPE_FLOAT64))
-                 && (gal_blank_present(l, 1) || gal_blank_present(r, 1)))
-                ? 1 : 0 );
-
-
-  /* Start setting the operator and operands. */
-  switch(l->type)
-    {
-      BINARY_LT_IS_UINT8;
-      BINARY_LT_IS_INT8;
-      BINARY_LT_IS_UINT16;
-      BINARY_LT_IS_INT16;
-      BINARY_LT_IS_UINT32;
-      BINARY_LT_IS_INT32;
-      BINARY_LT_IS_UINT64;
-      BINARY_LT_IS_INT64;
-      BINARY_LT_IS_FLOAT32;
-      BINARY_LT_IS_FLOAT64;
-    default:
-      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",
-            __func__, l->type);
-    }
-
-
-  /* Clean up. Note that if the input arrays can be freed, and any of right
-     or left arrays needed conversion, `BINARY_CONVERT_TO_COMPILED_TYPE'
-     has already freed the input arrays, so only `r' and `l' need
-     freeing. Alternatively, when the inputs shouldn't be freed, the only
-     allocated spaces are the `r' and `l' arrays if their types weren't
-     compiled for binary operations, we can tell this from the pointers: if
-     they are different from the original pointers, they were allocated. */
-  if(flags & GAL_ARITHMETIC_FREE)
-    {
-      if     (o==l)       gal_data_free(r);
-      else if(o==r)       gal_data_free(l);
-      else              { gal_data_free(l); gal_data_free(r); }
-    }
-  else
-    {
-      if(l!=lo)           gal_data_free(l);
-      if(r!=ro)           gal_data_free(r);
-    }
-
-
-  /* The type of the output dataset (`o->type') was chosen from `l' and `r'
-     (copies of the orignal operands but in a compiled type, not
-     necessarily the original `lo' and `ro' data structures). So we need to
-     to get the final type based on the original operands and check if the
-     final output needs changing.
-
-     IMPORTANT: This has to be done after (possibly) freeing the left and
-     right operands because this step can change the `o' pointer which
-     they may depend on (when working in-place). */
-  if( o->type != final_otype )
-    {
-      tmp_o=gal_data_copy_to_new_type(o, final_otype);
-      gal_data_free(o);
-      o=tmp_o;
-    }
-
-  /* Return */
-  return o;
-}
diff --git a/lib/arithmetic-bitand.c b/lib/arithmetic-bitand.c
new file mode 100644
index 0000000..d307285
--- /dev/null
+++ b/lib/arithmetic-bitand.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_bitand(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the bitand operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), & );
+}
diff --git a/lib/arithmetic-bitlsh.c b/lib/arithmetic-bitlsh.c
new file mode 100644
index 0000000..85538a1
--- /dev/null
+++ b/lib/arithmetic-bitlsh.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_bitlsh(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the bitlsh operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), << );
+}
diff --git a/lib/arithmetic-bitor.c b/lib/arithmetic-bitor.c
new file mode 100644
index 0000000..84ccea6
--- /dev/null
+++ b/lib/arithmetic-bitor.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_bitor(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the bitor operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), | );
+}
diff --git a/lib/arithmetic-bitrsh.c b/lib/arithmetic-bitrsh.c
new file mode 100644
index 0000000..a4f7e84
--- /dev/null
+++ b/lib/arithmetic-bitrsh.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_bitrsh(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the bitrsh operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), >> );
+}
diff --git a/lib/arithmetic-bitxor.c b/lib/arithmetic-bitxor.c
new file mode 100644
index 0000000..7df2f75
--- /dev/null
+++ b/lib/arithmetic-bitxor.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_bitxor(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the bitxor operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), ^ );
+}
diff --git a/lib/arithmetic-divide.c b/lib/arithmetic-divide.c
new file mode 100644
index 0000000..146bac3
--- /dev/null
+++ b/lib/arithmetic-divide.c
@@ -0,0 +1,53 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
+
+
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_divide(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ( o->type==l->type
+                   ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                   : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), / );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-eq.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-eq.c
index 16c36e2..8ce458a 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-eq.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_eq(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, == );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-ge.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-ge.c
index 16c36e2..4f560af 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-ge.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_ge(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, >= );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-gt.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-gt.c
index 16c36e2..f83deb7 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-gt.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_gt(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, > );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-le.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-le.c
index 16c36e2..3d8f510 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-le.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_le(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, <= );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-lt.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-lt.c
index 16c36e2..b99c874 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-lt.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_lt(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, < );
+}
diff --git a/lib/arithmetic-minus.c b/lib/arithmetic-minus.c
new file mode 100644
index 0000000..d88a0f6
--- /dev/null
+++ b/lib/arithmetic-minus.c
@@ -0,0 +1,53 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
+
+
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_minus(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ( o->type==l->type
+                   ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                   : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), - );
+}
diff --git a/lib/arithmetic-modulo.c b/lib/arithmetic-modulo.c
new file mode 100644
index 0000000..f48db5e
--- /dev/null
+++ b/lib/arithmetic-modulo.c
@@ -0,0 +1,58 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+
+
+
+
+
+
+/* `BINARY_SET_LT_INT' is defined in `arithmetic-binary.h'. As you see
+   there, this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_modulo(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  /* A small sanity check. */
+  if( l->type==GAL_TYPE_FLOAT32 || l->type==GAL_TYPE_FLOAT64
+      || r->type==GAL_TYPE_FLOAT32 || r->type==GAL_TYPE_FLOAT64 )
+      error(EXIT_FAILURE, 0, "%s: the modulo operator can only work on "
+            "integer type operands", __func__);
+
+  /* Do the operation. */
+  BINARY_SET_LT_INT( ( o->type==l->type
+                       ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                       : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), % );
+}
diff --git a/lib/arithmetic-multiply.c b/lib/arithmetic-multiply.c
new file mode 100644
index 0000000..e060e36
--- /dev/null
+++ b/lib/arithmetic-multiply.c
@@ -0,0 +1,53 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
+
+
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_multiply(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ( o->type==l->type
+                   ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                   : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), * );
+}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-ne.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-ne.c
index 16c36e2..3182b15 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-ne.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_ne(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, != );
+}
diff --git a/lib/arithmetic-onlyint.c b/lib/arithmetic-onlyint.c
deleted file mode 100644
index 9e26382..0000000
--- a/lib/arithmetic-onlyint.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/*********************************************************************
-Arithmetic operations on data structures.
-This is part of GNU Astronomy Utilities (Gnuastro) package.
-
-Original author:
-     Mohammad Akhlaghi <akhlaghi@gnu.org>
-Contributing author(s):
-Copyright (C) 2016, Free Software Foundation, Inc.
-
-Gnuastro is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation, either version 3 of the License, or (at your
-option) any later version.
-
-Gnuastro is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
-**********************************************************************/
-#include <config.h>
-
-#include <stdio.h>
-#include <errno.h>
-#include <error.h>
-#include <stdlib.h>
-
-#include <gnuastro/arithmetic.h>
-
-#include <gnuastro-internal/arithmetic-onlyint.h>
-#include <gnuastro-internal/arithmetic-internal.h>
-
-
-
-
-
-/************************************************************************/
-/*************            Native type macros            *****************/
-/************************************************************************/
-#if GAL_CONFIG_BIN_OP_UINT8 == 1
-#define BINOIN_LT_IS_UINT8                                         \
-  case GAL_TYPE_UINT8: BINOIN_LT_SET(uint8_t);          break;
-#define BINOIN_LT_SET_RT_IS_UINT8(LT)                              \
-  case GAL_TYPE_UINT8: BINOIN_RT_LT_SET(uint8_t, LT);   break;
-#else
-#define BINOIN_LT_IS_UINT8
-#define BINOIN_LT_SET_RT_IS_UINT8(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT8 == 1
-#define BINOIN_LT_IS_INT8                                          \
-  case GAL_TYPE_INT8: BINOIN_LT_SET(int8_t);            break;
-#define BINOIN_LT_SET_RT_IS_INT8(LT)                               \
-  case GAL_TYPE_INT8: BINOIN_RT_LT_SET(int8_t, LT);     break;
-#else
-#define BINOIN_LT_IS_INT8
-#define BINOIN_LT_SET_RT_IS_INT8(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT16 == 1
-#define BINOIN_LT_IS_UINT16                                        \
-  case GAL_TYPE_UINT16: BINOIN_LT_SET(uint16_t);        break;
-#define BINOIN_LT_SET_RT_IS_UINT16(LT)                             \
-  case GAL_TYPE_UINT16: BINOIN_RT_LT_SET(uint16_t, LT); break;
-#else
-#define BINOIN_LT_IS_UINT16
-#define BINOIN_LT_SET_RT_IS_UINT16(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT16 == 1
-#define BINOIN_LT_IS_INT16                                         \
-  case GAL_TYPE_INT16: BINOIN_LT_SET(int16_t);          break;
-#define BINOIN_LT_SET_RT_IS_INT16(LT)                              \
-  case GAL_TYPE_INT16: BINOIN_RT_LT_SET(int16_t, LT);   break;
-#else
-#define BINOIN_LT_IS_INT16
-#define BINOIN_LT_SET_RT_IS_INT16(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT32 == 1
-#define BINOIN_LT_IS_UINT32                                        \
-  case GAL_TYPE_UINT32: BINOIN_LT_SET(uint32_t);        break;
-#define BINOIN_LT_SET_RT_IS_UINT32(LT)                             \
-  case GAL_TYPE_UINT32: BINOIN_RT_LT_SET(uint32_t, LT); break;
-#else
-#define BINOIN_LT_IS_UINT32
-#define BINOIN_LT_SET_RT_IS_UINT32(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT32 == 1
-#define BINOIN_LT_IS_INT32                                         \
-  case GAL_TYPE_INT32: BINOIN_LT_SET(int32_t);          break;
-#define BINOIN_LT_SET_RT_IS_INT32(LT)                              \
-  case GAL_TYPE_INT32: BINOIN_RT_LT_SET(int32_t, LT);   break;
-#else
-#define BINOIN_LT_IS_INT32
-#define BINOIN_LT_SET_RT_IS_INT32(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_UINT64 == 1
-#define BINOIN_LT_IS_UINT64                                        \
-  case GAL_TYPE_UINT64: BINOIN_LT_SET(uint64_t);        break;
-#define BINOIN_LT_SET_RT_IS_UINT64(LT)                             \
-  case GAL_TYPE_UINT64: BINOIN_RT_LT_SET(uint64_t, LT); break;
-#else
-#define BINOIN_LT_IS_UINT64
-#define BINOIN_LT_SET_RT_IS_UINT64(LT)
-#endif
-
-
-
-
-
-#if GAL_CONFIG_BIN_OP_INT64 == 1
-#define BINOIN_LT_IS_INT64                                         \
-  case GAL_TYPE_INT64: BINOIN_LT_SET(int64_t);          break;
-#define BINOIN_LT_SET_RT_IS_INT64(LT)                              \
-  case GAL_TYPE_INT64: BINOIN_RT_LT_SET(int64_t, LT);   break;
-#else
-#define BINOIN_LT_IS_INT64
-#define BINOIN_LT_SET_RT_IS_INT64(LT)
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*************              High level macros           *****************/
-/************************************************************************/
-/* Final step to be used by all operators and all types. */
-#define BINOIN_OP_OT_RT_LT_SET(OP, OT, RT, LT) {                   \
-    LT *la=l->array;                                               \
-    RT *ra=r->array;                                               \
-    OT *oa=o->array, *of=oa + o->size;                             \
-    if(l->size==r->size) do *oa = *la++ OP *ra++; while(++oa<of);  \
-    else if(l->size==1)  do *oa = *la   OP *ra++; while(++oa<of);  \
-    else                 do *oa = *la++ OP *ra;   while(++oa<of);  \
-  }
-
-
-
-
-
-/* For operators whose type may be any of the given inputs. */
-#define BINOIN_OP_RT_LT_SET(OP, RT, LT)                            \
-  if(o->type==l->type)                                             \
-    BINOIN_OP_OT_RT_LT_SET(OP, LT, RT, LT)                         \
-  else                                                             \
-    BINOIN_OP_OT_RT_LT_SET(OP, RT, RT, LT)
-
-
-
-
-
-/* Left and right types set, choose what to do based on operator. */
-#define BINOIN_RT_LT_SET(RT, LT)                                   \
-  switch(operator)                                                 \
-    {                                                              \
-    case GAL_ARITHMETIC_OP_MODULO:                                 \
-      BINOIN_OP_RT_LT_SET(%, RT, LT);                              \
-      break;                                                       \
-    case GAL_ARITHMETIC_OP_BITAND:                                 \
-      BINOIN_OP_RT_LT_SET(&, RT, LT);                              \
-      break;                                                       \
-    case GAL_ARITHMETIC_OP_BITOR:                                  \
-      BINOIN_OP_RT_LT_SET(|, RT, LT);                              \
-      break;                                                       \
-    case GAL_ARITHMETIC_OP_BITXOR:                                 \
-      BINOIN_OP_RT_LT_SET(^, RT, LT);                              \
-      break;                                                       \
-    case GAL_ARITHMETIC_OP_BITLSH:                                 \
-      BINOIN_OP_RT_LT_SET(<<, RT, LT);                             \
-      break;                                                       \
-    case GAL_ARITHMETIC_OP_BITRSH:                                 \
-      BINOIN_OP_RT_LT_SET(>>, RT, LT);                             \
-      break;                                                       \
-    default:                                                       \
-      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized",\
-            "BINOIN_RT_LT_SET", operator);                         \
-    }
-
-
-
-
-
-
-/* Left operand type set, see what the right operand type is. */
-#define BINOIN_LT_SET(LT)                                          \
-  switch(r->type)                                                  \
-    {                                                              \
-      BINOIN_LT_SET_RT_IS_UINT8(LT);                               \
-      BINOIN_LT_SET_RT_IS_INT8(LT);                                \
-      BINOIN_LT_SET_RT_IS_UINT16(LT);                              \
-      BINOIN_LT_SET_RT_IS_INT16(LT);                               \
-      BINOIN_LT_SET_RT_IS_UINT32(LT);                              \
-      BINOIN_LT_SET_RT_IS_INT32(LT);                               \
-      BINOIN_LT_SET_RT_IS_UINT64(LT);                              \
-      BINOIN_LT_SET_RT_IS_INT64(LT);                               \
-    default:                                                       \
-      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",    \
-            "BINOIN_LT_SET", r->type);                             \
-    }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*************              Top level function          *****************/
-/************************************************************************/
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags,
-                          gal_data_t *lo, gal_data_t *ro)
-{
-  /* Read the variable arguments. `lo' and `ro' keep the original data, in
-     case their type isn't built (based on configure options are configure
-     time). */
-  int otype, final_otype;
-  size_t out_size, minmapsize;
-  gal_data_t *l, *r, *o=NULL, *tmp_o;
-  char *opstring=gal_arithmetic_operator_string(operator);
-
-
-  /* Simple sanity check on the input sizes and types */
-  if( !( (flags & GAL_ARITHMETIC_NUMOK) && (lo->size==1 || ro->size==1))
-      && gal_data_dsize_is_different(lo, ro) )
-    error(EXIT_FAILURE, 0, "%s: the non-number inputs to %s don't have the "
-          "same dimension/size", __func__, opstring);
-
-  if( lo->type==GAL_TYPE_FLOAT32 || lo->type==GAL_TYPE_FLOAT64
-      || ro->type==GAL_TYPE_FLOAT32 || ro->type==GAL_TYPE_FLOAT64 )
-      error(EXIT_FAILURE, 0, "%s: the %s operator can only work on integer "
-            "type operands", __func__, opstring);
-
-
-  /* Set the final output type (independent of which types are
-     compiled). These needs to be done before the call to
-     `gal_arithmetic_convert_to_compiled_type', because that function can
-     free the space of the original data structures, thus we will loose the
-     original data structure information. */
-  final_otype=gal_arithmetic_binary_out_type(operator, lo, ro);
-
-
-  /* Make sure the input arrays have one of the compiled types. From this
-     point on, until the cleaning up section of this function, we won't be
-     using the `lo' and `ro' pointers. */
-  l=gal_arithmetic_convert_to_compiled_type(lo, flags);
-  r=gal_arithmetic_convert_to_compiled_type(ro, flags);
-
-
-  /* Sanity check: see if the compiled type is actually an integer. */
-  if( l->type>=GAL_TYPE_FLOAT32 || r->type>=GAL_TYPE_FLOAT32 )
-    error(EXIT_FAILURE, 0, "no larger integer compiled type. The `%s' "
-          "operator can only work on integer types. The left and right "
-          "operands had types `%s' and `%s'.\n\nYou can use the "
-          "`--enable-bin-op-XXXX' at configure time to compile a larger "
-          "type (note that unsigned types are considered to be larger than "
-          "signed ones). You can run the following command for more "
-          "information on these options (press the `SPACE' key to go down "
-          "and `q' to return to the command-line):\n\n"
-          "    $ info gnuastro \"Gnuastro configure options\"\n",
-          gal_arithmetic_operator_string(operator),
-          gal_type_name(lo->type, 1), gal_type_name(ro->type, 1));
-
-  /* Set the output type. */
-  otype=gal_type_out(l->type, r->type);
-
-
-  /* Set the output sizes. */
-  minmapsize = ( l->minmapsize < r->minmapsize
-                 ? l->minmapsize : r->minmapsize );
-  out_size = l->size > r->size ? l->size : r->size;
-
-
-  /* If we want inplace output, set the output pointer to one input. Note
-     that the output type can be different from both inputs.  */
-  if(flags & GAL_ARITHMETIC_INPLACE)
-    {
-      if     (l->type==otype && out_size==l->size)   o = l;
-      else if(r->type==otype && out_size==r->size)   o = r;
-    }
-
-
-  /* If the output pointer was not set for any reason, allocate it. For
-     `mmapsize', note that since its `size_t', it will always be
-     Positive. The `-1' that is recommended to give when you want the value
-     in RAM is actually the largest possible memory location. So we just
-     have to choose the smaller minmapsize of the two to decide if the
-     output array should be in RAM or not. */
-  if(o==NULL)
-    o = gal_data_alloc(NULL, otype,
-                       l->size>1 ? l->ndim  : r->ndim,
-                       l->size>1 ? l->dsize : r->dsize,
-                       l->size>1 ? l->wcs   : r->wcs,
-                       0, minmapsize, NULL, NULL, NULL );
-
-
-  /* Start setting the operator and operands. */
-  switch(l->type)
-    {
-      BINOIN_LT_IS_UINT8;
-      BINOIN_LT_IS_INT8;
-      BINOIN_LT_IS_UINT16;
-      BINOIN_LT_IS_INT16;
-      BINOIN_LT_IS_UINT32;
-      BINOIN_LT_IS_INT32;
-      BINOIN_LT_IS_UINT64;
-      BINOIN_LT_IS_INT64;
-    default:
-      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",
-            __func__, l->type);
-    }
-
-
-  /* Clean up. Note that if the input arrays can be freed, and any of right
-     or left arrays needed conversion, `BINOIN_CONVERT_TO_COMPILED_TYPE'
-     has already freed the input arrays, so only `r' and `l' need
-     freeing. Alternatively, when the inputs shouldn't be freed, the only
-     allocated spaces are the `r' and `l' arrays if their types weren't
-     compiled for binary operations, we can tell this from the pointers: if
-     they are different from the original pointers, they were allocated. */
-  if(flags & GAL_ARITHMETIC_FREE)
-    {
-      if     (o==l)       gal_data_free(r);
-      else if(o==r)       gal_data_free(l);
-      else              { gal_data_free(l); gal_data_free(r); }
-    }
-  else
-    {
-      if(l!=lo)           gal_data_free(l);
-      if(r!=ro)           gal_data_free(r);
-    }
-
-
-  /* The type of the output dataset (`o->type') was chosen from `l' and `r'
-     (copies of the orignal operands but in a compiled type, not
-     necessarily the original `lo' and `ro' data structures). So we need to
-     to get the final type based on the original operands and check if the
-     final output needs changing.
-
-     IMPORTANT: This has to be done after (possibly) freeing the left and
-     right operands because this step can change the `o' pointer which
-     they may depend on (when working in-place). */
-  if( o->type != final_otype )
-    {
-      tmp_o=gal_data_copy_to_new_type(o, final_otype);
-      gal_data_free(o);
-      o=tmp_o;
-    }
-
-
-  /* Return */
-  return o;
-}
-
-
-
-
-
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in)
-{
-  gal_data_t *o;
-  uint8_t    *iu8  = in->array,  *iu8f  = iu8  + in->size,   *ou8;
-  int8_t     *ii8  = in->array,  *ii8f  = ii8  + in->size,   *oi8;
-  uint16_t   *iu16 = in->array,  *iu16f = iu16 + in->size,   *ou16;
-  int16_t    *ii16 = in->array,  *ii16f = ii16 + in->size,   *oi16;
-  uint32_t   *iu32 = in->array,  *iu32f = iu32 + in->size,   *ou32;
-  int32_t    *ii32 = in->array,  *ii32f = ii32 + in->size,   *oi32;
-  uint64_t   *iu64 = in->array,  *iu64f = iu64 + in->size,   *ou64;
-  int64_t    *ii64 = in->array,  *ii64f = ii64 + in->size,   *oi64;
-
-  /* Check the type */
-  switch(in->type)
-    {
-    case GAL_TYPE_FLOAT32:
-    case GAL_TYPE_FLOAT64:
-      error(EXIT_FAILURE, 0, "%s: bitwise not (one's complement) "
-            "operator can only work on integer types", __func__);
-    }
-
-  /* If we want inplace output, set the output pointer to the input
-     pointer, for every pixel, the operation will be independent. */
-  if(flags & GAL_ARITHMETIC_INPLACE)
-    o = in;
-  else
-    o = gal_data_alloc(NULL, in->type, in->ndim, in->dsize, in->wcs,
-                       0, in->minmapsize, NULL, NULL, NULL);
-
-  /* Start setting the types. */
-  switch(in->type)
-    {
-    case GAL_TYPE_UINT8:
-      ou8=o->array;   do  *ou8++ = ~(*iu8++);    while(iu8<iu8f);     break;
-
-    case GAL_TYPE_INT8:
-      oi8=o->array;   do  *oi8++ = ~(*ii8++);    while(ii8<ii8f);     break;
-
-    case GAL_TYPE_UINT16:
-      ou16=o->array;  do *ou16++ = ~(*iu16++);   while(iu16<iu16f);   break;
-
-    case GAL_TYPE_INT16:
-      oi16=o->array;  do *oi16++ = ~(*ii16++);   while(ii16<ii16f);   break;
-
-    case GAL_TYPE_UINT32:
-      ou32=o->array;  do *ou32++ = ~(*iu32++);   while(iu32<iu32f);   break;
-
-    case GAL_TYPE_INT32:
-      oi32=o->array;  do *oi32++ = ~(*ii32++);   while(ii32<ii32f);   break;
-
-    case GAL_TYPE_UINT64:
-      ou64=o->array;  do *ou64++ = ~(*iu64++);   while(iu64<iu64f);   break;
-
-    case GAL_TYPE_INT64:
-      oi64=o->array;  do *oi64++ = ~(*ii64++);   while(ii64<ii64f);   break;
-
-    default:
-      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",
-            __func__, in->type);
-    }
-
-
-  /* Clean up. Note that if the input arrays can be freed, and any of right
-     or left arrays needed conversion, `UNIFUNC_CONVERT_TO_COMPILED_TYPE'
-     has already freed the input arrays, and we only have `r' and `l'
-     allocated in any case. Alternatively, when the inputs shouldn't be
-     freed, the only allocated spaces are the `r' and `l' arrays if their
-     types weren't compiled for binary operations, we can tell this from
-     the pointers: if they are different from the original pointers, they
-     were allocated. */
-  if( (flags & GAL_ARITHMETIC_FREE) && o!=in)
-    gal_data_free(in);
-
-  /* Return */
-  return o;
-}
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h b/lib/arithmetic-or.c
similarity index 50%
copy from lib/gnuastro-internal/arithmetic-onlyint.h
copy to lib/arithmetic-or.c
index 16c36e2..57be198 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/arithmetic-or.c
@@ -5,7 +5,7 @@ This is part of GNU Astronomy Utilities (Gnuastro) package.
 Original author:
      Mohammad Akhlaghi <akhlaghi@gnu.org>
 Contributing author(s):
-Copyright (C) 2015, Free Software Foundation, Inc.
+Copyright (C) 2016, Free Software Foundation, Inc.
 
 Gnuastro is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -20,16 +20,32 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
+#include <config.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
 
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
+#include <gnuastro/blank.h>
 
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
 
 
-#endif
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_or(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ARITHMETIC_BINARY_OUT_TYPE_UINT8, || );
+}
diff --git a/lib/arithmetic-plus.c b/lib/arithmetic-plus.c
new file mode 100644
index 0000000..22c7caa
--- /dev/null
+++ b/lib/arithmetic-plus.c
@@ -0,0 +1,53 @@
+/*********************************************************************
+Arithmetic operations on data structures.
+This is part of GNU Astronomy Utilities (Gnuastro) package.
+
+Original author:
+     Mohammad Akhlaghi <akhlaghi@gnu.org>
+Contributing author(s):
+Copyright (C) 2016, Free Software Foundation, Inc.
+
+Gnuastro is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+Gnuastro is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+**********************************************************************/
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include <gnuastro/blank.h>
+
+#include <gnuastro-internal/arithmetic-binary.h>
+#include <gnuastro-internal/arithmetic-internal.h>
+
+
+
+
+
+/* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
+   this is a deep macro (calls other macros) to deal with different
+   types. This allows efficiency in processing (after compilation), but
+   compilation will be very slow. Therefore, for each operator we have
+   defined a separate `.c' file so they are built separately and when built
+   in parallel can be much faster than having them all in a single file. */
+void
+arithmetic_plus(gal_data_t *l, gal_data_t *r, gal_data_t *o)
+{
+  int checkblank=gal_arithmetic_binary_checkblank(l, r);
+
+  BINARY_SET_LT( ( o->type==l->type
+                   ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
+                   : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), + );
+}
diff --git a/lib/arithmetic.c b/lib/arithmetic.c
index db61e9c..878173c 100644
--- a/lib/arithmetic.c
+++ b/lib/arithmetic.c
@@ -33,10 +33,84 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #include <gnuastro/statistics.h>
 #include <gnuastro/arithmetic.h>
 
-#include <gnuastro-internal/arithmetic-binary.h>
-#include <gnuastro-internal/arithmetic-onlyint.h>
 #include <gnuastro-internal/arithmetic-internal.h>
 
+/* Headers for each binary operator. Since they heavily involve macros,
+   their compilation can be very large if they are in a single function and
+   file. So there is a separate C source and header file for each of these
+   functions.*/
+#include <gnuastro-internal/arithmetic-lt.h>
+#include <gnuastro-internal/arithmetic-le.h>
+#include <gnuastro-internal/arithmetic-gt.h>
+#include <gnuastro-internal/arithmetic-ge.h>
+#include <gnuastro-internal/arithmetic-eq.h>
+#include <gnuastro-internal/arithmetic-ne.h>
+#include <gnuastro-internal/arithmetic-or.h>
+#include <gnuastro-internal/arithmetic-and.h>
+#include <gnuastro-internal/arithmetic-plus.h>
+#include <gnuastro-internal/arithmetic-minus.h>
+#include <gnuastro-internal/arithmetic-bitor.h>
+#include <gnuastro-internal/arithmetic-bitand.h>
+#include <gnuastro-internal/arithmetic-bitxor.h>
+#include <gnuastro-internal/arithmetic-bitlsh.h>
+#include <gnuastro-internal/arithmetic-bitrsh.h>
+#include <gnuastro-internal/arithmetic-modulo.h>
+#include <gnuastro-internal/arithmetic-divide.h>
+#include <gnuastro-internal/arithmetic-multiply.h>
+
+
+
+
+
+
+
+
+
+
+/***********************************************************************/
+/***************             Internal checks              **************/
+/***********************************************************************/
+/* Some functions are only for a floating point operand, so if the input
+   isn't floating point, inform the user to change the type explicitly,
+   doing it implicitly/internally puts too much responsability on the
+   program. */
+static void
+arithmetic_check_float_input(gal_data_t *in, int operator, char *numstr)
+{
+  switch(in->type)
+    {
+    case GAL_TYPE_FLOAT32:
+    case GAL_TYPE_FLOAT64:
+      break;
+    default:
+      error(EXIT_FAILURE, 0, "the %s operator can only accept single or "
+            "double precision floating point numbers as its operand. The "
+            "%s operand has type %s. You can use the `float' or `double' "
+            "operators before this operator to explicitly convert to the "
+            "desired precision floating point type. If the operand was "
+            "originally a typed number (string of characters), add an `f' "
+            "after it so it is directly read into the proper precision "
+            "floating point number (based on the number of non-zero "
+            "decimals it has)", gal_arithmetic_operator_string(operator),
+            numstr, gal_type_name(in->type, 1));
+    }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -46,7 +120,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 /***********************************************************************/
 /* Change input data structure type. */
 static gal_data_t *
-arithmetic_change_type(gal_data_t *data, int operator, unsigned char flags)
+arithmetic_change_type(gal_data_t *data, int operator, int flags)
 {
   int type=-1;
   gal_data_t *out;
@@ -92,7 +166,7 @@ arithmetic_change_type(gal_data_t *data, int operator, 
unsigned char flags)
   }
 
 static gal_data_t *
-arithmetic_not(gal_data_t *data, unsigned char flags)
+arithmetic_not(gal_data_t *data, int flags)
 {
   uint8_t *o;
   gal_data_t *out;
@@ -139,6 +213,81 @@ arithmetic_not(gal_data_t *data, unsigned char flags)
 
 
 
+/* Bitwise not operator. */
+static gal_data_t *
+arithmetic_bitwise_not(int flags, gal_data_t *in)
+{
+  gal_data_t *o;
+  uint8_t    *iu8  = in->array,  *iu8f  = iu8  + in->size,   *ou8;
+  int8_t     *ii8  = in->array,  *ii8f  = ii8  + in->size,   *oi8;
+  uint16_t   *iu16 = in->array,  *iu16f = iu16 + in->size,   *ou16;
+  int16_t    *ii16 = in->array,  *ii16f = ii16 + in->size,   *oi16;
+  uint32_t   *iu32 = in->array,  *iu32f = iu32 + in->size,   *ou32;
+  int32_t    *ii32 = in->array,  *ii32f = ii32 + in->size,   *oi32;
+  uint64_t   *iu64 = in->array,  *iu64f = iu64 + in->size,   *ou64;
+  int64_t    *ii64 = in->array,  *ii64f = ii64 + in->size,   *oi64;
+
+  /* Check the type */
+  switch(in->type)
+    {
+    case GAL_TYPE_FLOAT32:
+    case GAL_TYPE_FLOAT64:
+      error(EXIT_FAILURE, 0, "%s: bitwise not (one's complement) "
+            "operator can only work on integer types", __func__);
+    }
+
+  /* If we want inplace output, set the output pointer to the input
+     pointer, for every pixel, the operation will be independent. */
+  if(flags & GAL_ARITHMETIC_INPLACE)
+    o = in;
+  else
+    o = gal_data_alloc(NULL, in->type, in->ndim, in->dsize, in->wcs,
+                       0, in->minmapsize, NULL, NULL, NULL);
+
+  /* Start setting the types. */
+  switch(in->type)
+    {
+    case GAL_TYPE_UINT8:
+      ou8=o->array;   do  *ou8++ = ~(*iu8++);    while(iu8<iu8f);     break;
+
+    case GAL_TYPE_INT8:
+      oi8=o->array;   do  *oi8++ = ~(*ii8++);    while(ii8<ii8f);     break;
+
+    case GAL_TYPE_UINT16:
+      ou16=o->array;  do *ou16++ = ~(*iu16++);   while(iu16<iu16f);   break;
+
+    case GAL_TYPE_INT16:
+      oi16=o->array;  do *oi16++ = ~(*ii16++);   while(ii16<ii16f);   break;
+
+    case GAL_TYPE_UINT32:
+      ou32=o->array;  do *ou32++ = ~(*iu32++);   while(iu32<iu32f);   break;
+
+    case GAL_TYPE_INT32:
+      oi32=o->array;  do *oi32++ = ~(*ii32++);   while(ii32<ii32f);   break;
+
+    case GAL_TYPE_UINT64:
+      ou64=o->array;  do *ou64++ = ~(*iu64++);   while(iu64<iu64f);   break;
+
+    case GAL_TYPE_INT64:
+      oi64=o->array;  do *oi64++ = ~(*ii64++);   while(ii64<ii64f);   break;
+
+    default:
+      error(EXIT_FAILURE, 0, "%s: type code %d not recognized",
+            __func__, in->type);
+    }
+
+
+  /* Clean up (if necessary). */
+  if( (flags & GAL_ARITHMETIC_FREE) && o!=in)
+    gal_data_free(in);
+
+  /* Return */
+  return o;
+}
+
+
+
+
 
 /* We don't want to use the standard function for unary functions in the
    case of the absolute operator. This is because there are multiple
@@ -149,7 +298,7 @@ arithmetic_not(gal_data_t *data, unsigned char flags)
     do *o++ = FUNC(*a); while(++a<af);                             \
   }
 static gal_data_t *
-arithmetic_abs(unsigned char flags, gal_data_t *in)
+arithmetic_abs(int flags, gal_data_t *in)
 {
   gal_data_t *out;
 
@@ -198,82 +347,11 @@ arithmetic_abs(unsigned char flags, gal_data_t *in)
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/***********************************************************************/
-/***************          Checking functions              **************/
-/***********************************************************************/
-/* Some functions are only for a floating point operand, so if the input
-   isn't floating point, inform the user to change the type explicitly,
-   doing it implicitly/internally puts too much responsability on the
-   program. */
-static void
-arithmetic_check_float_input(gal_data_t *in, int operator, char *numstr)
-{
-  switch(in->type)
-    {
-    case GAL_TYPE_FLOAT32:
-    case GAL_TYPE_FLOAT64:
-      break;
-    default:
-      error(EXIT_FAILURE, 0, "the %s operator can only accept single or "
-            "double precision floating point numbers as its operand. The "
-            "%s operand has type %s. You can use the `float' or `double' "
-            "operators before this operator to explicitly convert to the "
-            "desired precision floating point type. If the operand was "
-            "originally a typed number (string of characters), add an `f' "
-            "after it so it is directly read into the proper precision "
-            "floating point number (based on the number of non-zero "
-            "decimals it has)", gal_arithmetic_operator_string(operator),
-            numstr, gal_type_name(in->type, 1));
-    }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/***********************************************************************/
-/***************             Unary functions              **************/
-/***********************************************************************/
-
 #define UNIFUNC_RUN_FUNCTION_ON_ELEMENT(IT, OP){                        \
     IT *ia=in->array, *oa=o->array, *iaf=ia + in->size;                 \
     do *oa++ = OP(*ia++); while(ia<iaf);                                \
   }
 
-
-
-
-
 #define UNIARY_FUNCTION_ON_ELEMENT(OP)                                  \
   switch(in->type)                                                      \
     {                                                                   \
@@ -312,12 +390,8 @@ arithmetic_check_float_input(gal_data_t *in, int operator, 
char *numstr)
             "UNIARY_FUNCTION_ON_ELEMENT", in->type);                    \
     }
 
-
-
-
-
 static gal_data_t *
-arithmetic_unary_function(int operator, unsigned char flags, gal_data_t *in)
+arithmetic_unary_function(int operator, int flags, gal_data_t *in)
 {
   gal_data_t *o;
 
@@ -369,7 +443,32 @@ arithmetic_unary_function(int operator, unsigned char 
flags, gal_data_t *in)
 
 
 
+/* Call functions in the `gnuastro/statistics' library. */
+static gal_data_t *
+arithmetic_from_statistics(int operator, int flags, gal_data_t *input)
+{
+  gal_data_t *out=NULL;
+  int ip=(flags & GAL_ARITHMETIC_INPLACE) || (flags & GAL_ARITHMETIC_FREE);
+
+  switch(operator)
+    {
+    case GAL_ARITHMETIC_OP_MINVAL:  out=gal_statistics_minimum(input); break;
+    case GAL_ARITHMETIC_OP_MAXVAL:  out=gal_statistics_maximum(input); break;
+    case GAL_ARITHMETIC_OP_NUMVAL:  out=gal_statistics_number(input);  break;
+    case GAL_ARITHMETIC_OP_SUMVAL:  out=gal_statistics_sum(input);     break;
+    case GAL_ARITHMETIC_OP_MEANVAL: out=gal_statistics_mean(input);    break;
+    case GAL_ARITHMETIC_OP_STDVAL:  out=gal_statistics_std(input);     break;
+    case GAL_ARITHMETIC_OP_MEDIANVAL:
+      out=gal_statistics_median(input, ip); break;
+    default:
+      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized",
+            __func__, operator);
+    }
 
+  /* If the input is to be freed, then do so and return the output. */
+  if( flags & GAL_ARITHMETIC_FREE ) gal_data_free(input);
+  return out;
+}
 
 
 
@@ -384,207 +483,42 @@ arithmetic_unary_function(int operator, unsigned char 
flags, gal_data_t *in)
 
 
 
-/***********************************************************************/
-/***************            Binary functions              **************/
-/***********************************************************************/
 
 
-#define BINFUNC_RUN_FUNCTION(OT, RT, LT, OP){                           \
-    LT *la=l->array;                                                    \
-    RT *ra=r->array;                                                    \
-    OT *oa=o->array, *of=oa + o->size;                                  \
-    if(l->size==r->size) do *oa = OP(*la++, *ra++); while(++oa<of);     \
-    else if(l->size==1)  do *oa = OP(*la,   *ra++); while(++oa<of);     \
-    else                 do *oa = OP(*la++, *ra  ); while(++oa<of);     \
-  }
 
 
 
 
+/***********************************************************************/
+/***************                  Where                   **************/
+/***********************************************************************/
 
-#define BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(RT, LT, OP)                   \
-  switch(o->type)                                                       \
-    {                                                                   \
-    case GAL_TYPE_FLOAT32:                                              \
-      BINFUNC_RUN_FUNCTION(float, RT, LT, OP);                          \
-      break;                                                            \
-    case GAL_TYPE_FLOAT64:                                              \
-      BINFUNC_RUN_FUNCTION(double, RT, LT, OP);                         \
-      break;                                                            \
-    default:                                                            \
-      error(EXIT_FAILURE, 0, "%s: type %d not recognized for o->type ", \
-            "BINFUNC_F_OPERATOR_LEFT_RIGHT_SET", o->type);              \
-    }
+/* When the `iftrue' dataset only has one element and the element is blank,
+   then it will be replaced with the blank value of the type of the output
+   data. */
+#define DO_WHERE_OPERATION(ITT, OT) {                                \
+    ITT *it=iftrue->array;                                           \
+    OT b, *o=out->array, *of=o+out->size;                            \
+    if(iftrue->size==1)                                              \
+      {                                                              \
+        if( gal_blank_present(iftrue, 0) )                           \
+          {                                                          \
+            gal_blank_write(&b, out->type);                          \
+            do { *o = *c++ ? b : *o;        } while(++o<of);         \
+          }                                                          \
+        else                                                         \
+          do   { *o = *c++ ? *it : *o;       } while(++o<of);        \
+      }                                                              \
+    else                                                             \
+      do       { *o = *c++ ? *it : *o; ++it; } while(++o<of);        \
+}
 
 
 
 
 
-#define BINFUNC_F_OPERATOR_LEFT_SET(LT, OP)                             \
-  switch(r->type)                                                       \
-    {                                                                   \
-    case GAL_TYPE_FLOAT32:                                              \
-      BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(float, LT, OP);                 \
-      break;                                                            \
-    case GAL_TYPE_FLOAT64:                                              \
-      BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(double, LT, OP);                \
-      break;                                                            \
-    default:                                                            \
-      error(EXIT_FAILURE, 0, "%s: type %d not recognized for r->type",  \
-            "BINFUNC_F_OPERATOR_LEFT_SET", r->type);                    \
-    }
-
-
-
-
-
-#define BINFUNC_F_OPERATOR_SET(OP)                                      \
-  switch(l->type)                                                       \
-    {                                                                   \
-    case GAL_TYPE_FLOAT32:                                              \
-      BINFUNC_F_OPERATOR_LEFT_SET(float, OP);                           \
-      break;                                                            \
-    case GAL_TYPE_FLOAT64:                                              \
-      BINFUNC_F_OPERATOR_LEFT_SET(double, OP);                          \
-      break;                                                            \
-    default:                                                            \
-      error(EXIT_FAILURE, 0, "%s: type %d not recognized for l->type",  \
-            "BINFUNC_F_OPERATOR_SET", l->type);                         \
-    }
-
-
-
-
-
-static gal_data_t *
-arithmetic_binary_function_flt(int operator, unsigned char flags,
-                               gal_data_t *l, gal_data_t *r)
-{
-  int final_otype;
-  gal_data_t *o=NULL;
-  size_t out_size, minmapsize;
-
-
-  /* Simple sanity check on the input sizes */
-  if( !( (flags & GAL_ARITHMETIC_NUMOK) && (l->size==1 || r->size==1))
-      && gal_data_dsize_is_different(l, r) )
-    error(EXIT_FAILURE, 0, "%s: the input datasets don't have the same "
-          "dimension/size", __func__);
-
-  /* Check for the types of the left and right operands. */
-  arithmetic_check_float_input(l, operator, "first");
-  arithmetic_check_float_input(r, operator, "second");
-
-  /* Set the output type. */
-  final_otype = gal_type_out(l->type, r->type);
-
-  /* Set the output sizes. */
-  minmapsize = ( l->minmapsize < r->minmapsize
-                 ? l->minmapsize : r->minmapsize );
-  out_size = l->size > r->size ? l->size : r->size;
-
-
-  /* If we want inplace output, set the output pointer to one input. Note
-     that the output type can be different from both inputs.  */
-  if(flags & GAL_ARITHMETIC_INPLACE)
-    {
-      if     (l->type==final_otype && out_size==l->size)   o = l;
-      else if(r->type==final_otype && out_size==r->size)   o = r;
-    }
-
-
-  /* If the output pointer was not set for any reason, allocate it. For
-     `mmapsize', note that since its `size_t', it will always be
-     Positive. The `-1' that is recommended to give when you want the value
-     in RAM is actually the largest possible memory location. So we just
-     have to choose the smaller minmapsize of the two to decide if the
-     output array should be in RAM or not. */
-  if(o==NULL)
-    o = gal_data_alloc(NULL, final_otype,
-                       l->size>1 ? l->ndim  : r->ndim,
-                       l->size>1 ? l->dsize : r->dsize,
-                       l->size>1 ? l->wcs : r->wcs, 0, minmapsize,
-                       NULL, NULL, NULL);
-
-
-  /* Start setting the operator and operands. */
-  switch(operator)
-    {
-    case GAL_ARITHMETIC_OP_POW:  BINFUNC_F_OPERATOR_SET( pow  ); break;
-    default:
-      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized",
-            __func__, operator);
-    }
-
-
-  /* Clean up. Note that if the input arrays can be freed, and any of right
-     or left arrays needed conversion, `BINFUNC_CONVERT_TO_COMPILED_TYPE'
-     has already freed the input arrays, and we only have `r' and `l'
-     allocated in any case. Alternatively, when the inputs shouldn't be
-     freed, the only allocated spaces are the `r' and `l' arrays if their
-     types weren't compiled for binary operations, we can tell this from
-     the pointers: if they are different from the original pointers, they
-     were allocated. */
-  if(flags & GAL_ARITHMETIC_FREE)
-    {
-      if     (o==l)       gal_data_free(r);
-      else if(o==r)       gal_data_free(l);
-      else              { gal_data_free(l); gal_data_free(r); }
-    }
-
-  /* Return */
-  return o;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/***********************************************************************/
-/***************                  Where                   **************/
-/***********************************************************************/
-
-/* When the `iftrue' dataset only has one element and the element is blank,
-   then it will be replaced with the blank value of the type of the output
-   data. */
-#define DO_WHERE_OPERATION(ITT, OT) {                                \
-    ITT *it=iftrue->array;                                           \
-    OT b, *o=out->array, *of=o+out->size;                            \
-    if(iftrue->size==1)                                              \
-      {                                                              \
-        if( gal_blank_present(iftrue, 0) )                           \
-          {                                                          \
-            gal_blank_write(&b, out->type);                          \
-            do { *o = *c++ ? b : *o;        } while(++o<of);         \
-          }                                                          \
-        else                                                         \
-          do   { *o = *c++ ? *it : *o;       } while(++o<of);        \
-      }                                                              \
-    else                                                             \
-      do       { *o = *c++ ? *it : *o; ++it; } while(++o<of);        \
-}
-
-
-
-
-
-#define WHERE_OUT_SET(OT)                                               \
-  switch(iftrue->type)                                                  \
+#define WHERE_OUT_SET(OT)                                               \
+  switch(iftrue->type)                                                  \
     {                                                                   \
     case GAL_TYPE_UINT8:    DO_WHERE_OPERATION( uint8_t,  OT);  break;  \
     case GAL_TYPE_INT8:     DO_WHERE_OPERATION( int8_t,   OT);  break;  \
@@ -606,7 +540,7 @@ arithmetic_binary_function_flt(int operator, unsigned char 
flags,
 
 
 static void
-arithmetic_where(unsigned char flags, gal_data_t *out, gal_data_t *cond,
+arithmetic_where(int flags, gal_data_t *out, gal_data_t *cond,
                  gal_data_t *iftrue)
 {
   unsigned char *c=cond->array;
@@ -959,7 +893,7 @@ arithmetic_where(unsigned char flags, gal_data_t *out, 
gal_data_t *cond,
    number of operators is determined from the fact that the last node in
    the linked list must have a NULL pointer as its `next' element.*/
 static gal_data_t *
-arithmetic_multioperand(int operator, unsigned char flags, gal_data_t *list)
+arithmetic_multioperand(int operator, int flags, gal_data_t *list)
 {
   uint8_t *hasblank;
   size_t i=0, dnum=1;
@@ -1083,10 +1017,28 @@ arithmetic_multioperand(int operator, unsigned char 
flags, gal_data_t *list)
 
 
 /**********************************************************************/
-/****************      Compiled binary op types       *****************/
+/****************           Binary operators          *****************/
 /**********************************************************************/
+/* See if we should check for blanks. When both types are floats, blanks
+   don't need to be checked (the floating point standard will do the job
+   for us). It is also not necessary to check blanks in bitwise operators,
+   but bitwise operators have their own macro
+   (`BINARY_OP_INCR_OT_RT_LT_SET') which doesn' use `checkblanks'.*/
 int
-gal_arithmetic_binary_out_type(int operator, gal_data_t *l, gal_data_t *r)
+gal_arithmetic_binary_checkblank(gal_data_t *l, gal_data_t *r)
+{
+  return ((((l->type!=GAL_TYPE_FLOAT32    && l->type!=GAL_TYPE_FLOAT64)
+            || (r->type!=GAL_TYPE_FLOAT32 && r->type!=GAL_TYPE_FLOAT64))
+           && (gal_blank_present(l, 1) || gal_blank_present(r, 1)))
+          ? 1 : 0 );
+}
+
+
+
+
+
+static int
+arithmetic_binary_out_type(int operator, gal_data_t *l, gal_data_t *r)
 {
   switch(operator)
     {
@@ -1106,118 +1058,245 @@ gal_arithmetic_binary_out_type(int operator, 
gal_data_t *l, gal_data_t *r)
 
 
 
-static int
-arithmetic_nearest_compiled_type(int intype)
+static gal_data_t *
+arithmetic_binary(int operator, int flags, gal_data_t *l, gal_data_t *r)
 {
-  switch(intype)
+  /* Read the variable arguments. `lo' and `ro' keep the original data, in
+     case their type isn't built (based on configure options are configure
+     time). */
+  int32_t otype;
+  gal_data_t *o=NULL;
+  size_t out_size, minmapsize;
+
+
+  /* Simple sanity check on the input sizes */
+  if( !( (flags & GAL_ARITHMETIC_NUMOK) && (l->size==1 || r->size==1))
+      && gal_data_dsize_is_different(l, r) )
+    error(EXIT_FAILURE, 0, "%s: the non-number inputs to %s don't have the "
+          "same dimension/size", __func__,
+          gal_arithmetic_operator_string(operator));
+
+
+  /* Set the output type. For the comparison operators, the output type is
+     either 0 or 1, so we will set the output type to `unsigned char' for
+     efficient memory and CPU usage. Since the number of operators without
+     a fixed output type (like the conditionals) is less, by `default' we
+     will set the output type to `unsigned char', and if any of the other
+     operatrs are given, it will be chosen based on the input types.*/
+  otype=arithmetic_binary_out_type(operator, l, r);
+
+
+  /* Set the output sizes. */
+  minmapsize = ( l->minmapsize < r->minmapsize
+                 ? l->minmapsize : r->minmapsize );
+  out_size = l->size > r->size ? l->size : r->size;
+
+
+  /* If we want inplace output, set the output pointer to one input. Note
+     that the output type can be different from both inputs.  */
+  if(flags & GAL_ARITHMETIC_INPLACE)
     {
-    case GAL_TYPE_UINT8:
-      if(GAL_CONFIG_BIN_OP_UINT8) return GAL_TYPE_UINT8;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_UINT16)   return GAL_TYPE_UINT16;
-          else if(GAL_CONFIG_BIN_OP_INT16)    return GAL_TYPE_INT16;
-          else if(GAL_CONFIG_BIN_OP_UINT32)   return GAL_TYPE_UINT32;
-          else if(GAL_CONFIG_BIN_OP_INT32)    return GAL_TYPE_INT32;
-          else if(GAL_CONFIG_BIN_OP_UINT64)   return GAL_TYPE_UINT64;
-          else if(GAL_CONFIG_BIN_OP_INT64)    return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)  return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)  return GAL_TYPE_FLOAT64;
-        }
-      break;
+      if     (l->type==otype && out_size==l->size)   o = l;
+      else if(r->type==otype && out_size==r->size)   o = r;
+    }
 
-    case GAL_TYPE_INT8:
-      if(GAL_CONFIG_BIN_OP_INT8) return GAL_TYPE_INT8;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_INT16)    return GAL_TYPE_INT16;
-          else if(GAL_CONFIG_BIN_OP_INT32)    return GAL_TYPE_INT32;
-          else if(GAL_CONFIG_BIN_OP_INT64)    return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)  return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)  return GAL_TYPE_FLOAT64;
-        }
-      break;
 
-    case GAL_TYPE_UINT16:
-      if(GAL_CONFIG_BIN_OP_UINT16) return GAL_TYPE_UINT16;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_UINT32)   return GAL_TYPE_UINT32;
-          else if(GAL_CONFIG_BIN_OP_INT32)    return GAL_TYPE_INT32;
-          else if(GAL_CONFIG_BIN_OP_UINT64)   return GAL_TYPE_UINT64;
-          else if(GAL_CONFIG_BIN_OP_INT64)    return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)  return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)  return GAL_TYPE_FLOAT64;
-        }
-      break;
+  /* If the output pointer was not set above for any of the possible
+     reasons, allocate it. For `mmapsize', note that since its `size_t', it
+     will always be positive. The `-1' that is recommended to give when you
+     want the value in RAM is actually the largest possible memory
+     location. So we just have to choose the smaller minmapsize of the two
+     to decide if the output array should be in RAM or not. */
+  if(o==NULL)
+    o = gal_data_alloc(NULL, otype,
+                       l->size>1 ? l->ndim  : r->ndim,
+                       l->size>1 ? l->dsize : r->dsize,
+                       l->size>1 ? l->wcs   : r->wcs,
+                       0, minmapsize, NULL, NULL, NULL );
 
-    case GAL_TYPE_INT16:
-      if(GAL_CONFIG_BIN_OP_INT16) return GAL_TYPE_INT16;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_INT32)    return GAL_TYPE_INT32;
-          else if(GAL_CONFIG_BIN_OP_INT64)    return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)  return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)  return GAL_TYPE_FLOAT64;
-        }
-      break;
 
-    case GAL_TYPE_UINT32:
-      if(GAL_CONFIG_BIN_OP_UINT32) return GAL_TYPE_UINT32;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_UINT64)   return GAL_TYPE_UINT64;
-          else if(GAL_CONFIG_BIN_OP_INT64)    return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)  return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)  return GAL_TYPE_FLOAT64;
-        }
-      break;
+  /* Call the proper function for the operator. Since they heavily involve
+     macros, their compilation can be very large if they are in a single
+     function and file. So there is a separate C source and header file for
+     each of these functions. */
+  switch(operator)
+    {
+    case GAL_ARITHMETIC_OP_PLUS:     arithmetic_plus(l, r, o);     break;
+    case GAL_ARITHMETIC_OP_MINUS:    arithmetic_minus(l, r, o);    break;
+    case GAL_ARITHMETIC_OP_MULTIPLY: arithmetic_multiply(l, r, o); break;
+    case GAL_ARITHMETIC_OP_DIVIDE:   arithmetic_divide(l, r, o);   break;
+    case GAL_ARITHMETIC_OP_LT:       arithmetic_lt(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_LE:       arithmetic_le(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_GT:       arithmetic_gt(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_GE:       arithmetic_ge(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_EQ:       arithmetic_eq(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_NE:       arithmetic_ne(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_AND:      arithmetic_and(l, r, o);      break;
+    case GAL_ARITHMETIC_OP_OR:       arithmetic_or(l, r, o);       break;
+    case GAL_ARITHMETIC_OP_BITAND:   arithmetic_bitand(l, r, o);   break;
+    case GAL_ARITHMETIC_OP_BITOR:    arithmetic_bitor(l, r, o);    break;
+    case GAL_ARITHMETIC_OP_BITXOR:   arithmetic_bitxor(l, r, o);   break;
+    case GAL_ARITHMETIC_OP_BITLSH:   arithmetic_bitlsh(l, r, o);   break;
+    case GAL_ARITHMETIC_OP_BITRSH:   arithmetic_bitrsh(l, r, o);   break;
+    case GAL_ARITHMETIC_OP_MODULO:   arithmetic_modulo(l, r, o);   break;
+    default:
+      error(EXIT_FAILURE, 0, "%s: a bug! please contact us at %s to address "
+            "the problem. %d is not a valid operator code", __func__,
+            PACKAGE_BUGREPORT, operator);
+    }
 
-    case GAL_TYPE_INT32:
-      if(GAL_CONFIG_BIN_OP_INT32) return GAL_TYPE_INT32;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_INT64)     return GAL_TYPE_INT64;
-          else if(GAL_CONFIG_BIN_OP_FLOAT32)   return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)   return GAL_TYPE_FLOAT64;
-        }
-      break;
 
-    case GAL_TYPE_UINT64:
-      if(GAL_CONFIG_BIN_OP_UINT64) return GAL_TYPE_UINT64;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_FLOAT32)   return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)   return GAL_TYPE_FLOAT64;
-        }
-      break;
+  /* Clean up if necessary. Note that if the operation was requested to be
+     in place, then the output might be one of the inputs. */
+  if(flags & GAL_ARITHMETIC_FREE)
+    {
+      if     (o==l)       gal_data_free(r);
+      else if(o==r)       gal_data_free(l);
+      else              { gal_data_free(l); gal_data_free(r); }
+    }
 
-    case GAL_TYPE_INT64:
-      if(GAL_CONFIG_BIN_OP_INT64) return GAL_TYPE_INT64;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_FLOAT32)   return GAL_TYPE_FLOAT32;
-          else if(GAL_CONFIG_BIN_OP_FLOAT64)   return GAL_TYPE_FLOAT64;
-        }
-      break;
 
-    case GAL_TYPE_FLOAT32:
-      if(GAL_CONFIG_BIN_OP_FLOAT32) return GAL_TYPE_FLOAT32;
-      else
-        {
-          if     (GAL_CONFIG_BIN_OP_FLOAT64)   return GAL_TYPE_FLOAT64;
-        }
-      break;
+  /* Return */
+  return o;
+}
 
-    case GAL_TYPE_FLOAT64:
-      if         (GAL_CONFIG_BIN_OP_FLOAT64)   return GAL_TYPE_FLOAT64;
-      break;
 
+
+
+
+#define BINFUNC_RUN_FUNCTION(OT, RT, LT, OP){                           \
+    LT *la=l->array;                                                    \
+    RT *ra=r->array;                                                    \
+    OT *oa=o->array, *of=oa + o->size;                                  \
+    if(l->size==r->size) do *oa = OP(*la++, *ra++); while(++oa<of);     \
+    else if(l->size==1)  do *oa = OP(*la,   *ra++); while(++oa<of);     \
+    else                 do *oa = OP(*la++, *ra  ); while(++oa<of);     \
+  }
+
+
+#define BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(RT, LT, OP)                   \
+  switch(o->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_FLOAT32:                                              \
+      BINFUNC_RUN_FUNCTION(float, RT, LT, OP);                          \
+      break;                                                            \
+    case GAL_TYPE_FLOAT64:                                              \
+      BINFUNC_RUN_FUNCTION(double, RT, LT, OP);                         \
+      break;                                                            \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: type %d not recognized for o->type ", \
+            "BINFUNC_F_OPERATOR_LEFT_RIGHT_SET", o->type);              \
+    }
+
+
+#define BINFUNC_F_OPERATOR_LEFT_SET(LT, OP)                             \
+  switch(r->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_FLOAT32:                                              \
+      BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(float, LT, OP);                 \
+      break;                                                            \
+    case GAL_TYPE_FLOAT64:                                              \
+      BINFUNC_F_OPERATOR_LEFT_RIGHT_SET(double, LT, OP);                \
+      break;                                                            \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: type %d not recognized for r->type",  \
+            "BINFUNC_F_OPERATOR_LEFT_SET", r->type);                    \
+    }
+
+
+#define BINFUNC_F_OPERATOR_SET(OP)                                      \
+  switch(l->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_FLOAT32:                                              \
+      BINFUNC_F_OPERATOR_LEFT_SET(float, OP);                           \
+      break;                                                            \
+    case GAL_TYPE_FLOAT64:                                              \
+      BINFUNC_F_OPERATOR_LEFT_SET(double, OP);                          \
+      break;                                                            \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: type %d not recognized for l->type",  \
+            "BINFUNC_F_OPERATOR_SET", l->type);                         \
+    }
+
+
+static gal_data_t *
+arithmetic_binary_function_flt(int operator, int flags, gal_data_t *l,
+                               gal_data_t *r)
+{
+  int final_otype;
+  gal_data_t *o=NULL;
+  size_t out_size, minmapsize;
+
+
+  /* Simple sanity check on the input sizes */
+  if( !( (flags & GAL_ARITHMETIC_NUMOK) && (l->size==1 || r->size==1))
+      && gal_data_dsize_is_different(l, r) )
+    error(EXIT_FAILURE, 0, "%s: the input datasets don't have the same "
+          "dimension/size", __func__);
+
+  /* Check for the types of the left and right operands. */
+  arithmetic_check_float_input(l, operator, "first");
+  arithmetic_check_float_input(r, operator, "second");
+
+  /* Set the output type. */
+  final_otype = gal_type_out(l->type, r->type);
+
+  /* Set the output sizes. */
+  minmapsize = ( l->minmapsize < r->minmapsize
+                 ? l->minmapsize : r->minmapsize );
+  out_size = l->size > r->size ? l->size : r->size;
+
+
+  /* If we want inplace output, set the output pointer to one input. Note
+     that the output type can be different from both inputs.  */
+  if(flags & GAL_ARITHMETIC_INPLACE)
+    {
+      if     (l->type==final_otype && out_size==l->size)   o = l;
+      else if(r->type==final_otype && out_size==r->size)   o = r;
+    }
+
+
+  /* If the output pointer was not set for any reason, allocate it. For
+     `mmapsize', note that since its `size_t', it will always be
+     Positive. The `-1' that is recommended to give when you want the value
+     in RAM is actually the largest possible memory location. So we just
+     have to choose the smaller minmapsize of the two to decide if the
+     output array should be in RAM or not. */
+  if(o==NULL)
+    o = gal_data_alloc(NULL, final_otype,
+                       l->size>1 ? l->ndim  : r->ndim,
+                       l->size>1 ? l->dsize : r->dsize,
+                       l->size>1 ? l->wcs : r->wcs, 0, minmapsize,
+                       NULL, NULL, NULL);
+
+
+  /* Start setting the operator and operands. */
+  switch(operator)
+    {
+    case GAL_ARITHMETIC_OP_POW:  BINFUNC_F_OPERATOR_SET( pow  ); break;
     default:
-      error(EXIT_FAILURE, 0, "%s: type %d not recognized", __func__, intype);
+      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized",
+            __func__, operator);
+    }
+
+
+  /* Clean up. Note that if the input arrays can be freed, and any of right
+     or left arrays needed conversion, `BINFUNC_CONVERT_TO_COMPILED_TYPE'
+     has already freed the input arrays, and we only have `r' and `l'
+     allocated in any case. Alternatively, when the inputs shouldn't be
+     freed, the only allocated spaces are the `r' and `l' arrays if their
+     types weren't compiled for binary operations, we can tell this from
+     the pointers: if they are different from the original pointers, they
+     were allocated. */
+  if(flags & GAL_ARITHMETIC_FREE)
+    {
+      if     (o==l)       gal_data_free(r);
+      else if(o==r)       gal_data_free(l);
+      else              { gal_data_free(l); gal_data_free(r); }
     }
 
-  return 0;
+  /* Return */
+  return o;
 }
 
 
@@ -1320,95 +1399,8 @@ gal_arithmetic_operator_string(int operator)
 
 
 
-/* Note that for signed types, we won't be considering the unsigned types
-   of the larger types. */
 gal_data_t *
-gal_arithmetic_convert_to_compiled_type(gal_data_t *in, unsigned char flags)
-{
-  int ntype;
-  char *typestring;
-  gal_data_t *out=NULL;
-
-  /* Set the best compiled type. */
-  ntype=arithmetic_nearest_compiled_type(in->type);
-
-  /* If type is not compiled, then convert the dataset to the first
-     compiled larger type. */
-  if(in->type==ntype)
-    out=in;
-  else
-    {
-      if(ntype)
-        {
-          out=gal_data_copy_to_new_type(in, ntype);
-          if(flags & GAL_ARITHMETIC_FREE)
-            { gal_data_free(in); in=NULL; }
-        }
-      else
-        {
-          typestring=gal_type_name(in->type, 1);
-          error(EXIT_FAILURE, 0, "The given %s type data given to "
-                "binary operators is not compiled for native operation "
-                "and no larger types are compiled either.\n\nThe "
-                "largest type (which can act as a fallback for any "
-                "input type is double, so configure Gnuastro again "
-                "with `--enable-bin-op-double' to not get this error "
-                "any more. However, if you commonly deal with %s type "
-                "data, also enable %s with a similar option at "
-                "configure time to greatly decrease running time and "
-                "avoid unnecessary RAM and CPU resources. Run"
-                "`./configure --help' in Gnuastro's top source "
-                "directory (after unpacking the tarball) for the full "
-                "list of options", typestring, typestring, typestring);
-        }
-    }
-
-  /* Return the output data structure */
-  if(out==NULL)
-    error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s, so we can "
-          "fix the problem. For some reason, the `out' array has not been "
-          "set", __func__, PACKAGE_BUGREPORT);
-  return out;
-}
-
-
-
-
-
-/* Call functions in the `gnuastro/statistics' library. */
-static gal_data_t *
-arithmetic_from_statistics(int operator, unsigned char flags,
-                           gal_data_t *input)
-{
-  gal_data_t *out=NULL;
-  int ip=(flags & GAL_ARITHMETIC_INPLACE) || (flags & GAL_ARITHMETIC_FREE);
-
-  switch(operator)
-    {
-    case GAL_ARITHMETIC_OP_MINVAL:  out=gal_statistics_minimum(input); break;
-    case GAL_ARITHMETIC_OP_MAXVAL:  out=gal_statistics_maximum(input); break;
-    case GAL_ARITHMETIC_OP_NUMVAL:  out=gal_statistics_number(input);  break;
-    case GAL_ARITHMETIC_OP_SUMVAL:  out=gal_statistics_sum(input);     break;
-    case GAL_ARITHMETIC_OP_MEANVAL: out=gal_statistics_mean(input);    break;
-    case GAL_ARITHMETIC_OP_STDVAL:  out=gal_statistics_std(input);     break;
-    case GAL_ARITHMETIC_OP_MEDIANVAL:
-      out=gal_statistics_median(input, ip); break;
-    default:
-      error(EXIT_FAILURE, 0, "%s: operator code %d not recognized",
-            __func__, operator);
-    }
-
-  /* If the input is to be freed, then do so and return the output. */
-  if( flags & GAL_ARITHMETIC_FREE ) gal_data_free(input);
-  return out;
-}
-
-
-
-
-
-gal_data_t *
-gal_arithmetic(int operator, unsigned char flags, ...)
+gal_arithmetic(int operator, int flags, ...)
 {
   va_list va;
   gal_data_t *d1, *d2, *d3, *out=NULL;
@@ -1515,12 +1507,12 @@ gal_arithmetic(int operator, unsigned char flags, ...)
     case GAL_ARITHMETIC_OP_MODULO:
       d1 = va_arg(va, gal_data_t *);
       d2 = va_arg(va, gal_data_t *);
-      out=arithmetic_onlyint_binary(operator, flags, d1, d2);
+      out=arithmetic_binary(operator, flags, d1, d2);
       break;
 
     case GAL_ARITHMETIC_OP_BITNOT:
       d1 = va_arg(va, gal_data_t *);
-      out=arithmetic_onlyint_bitwise_not(flags, d1);
+      out=arithmetic_bitwise_not(flags, d1);
       break;
 
 
diff --git a/lib/gnuastro-internal/arithmetic-onlyint.h 
b/lib/gnuastro-internal/arithmetic-and.h
similarity index 77%
rename from lib/gnuastro-internal/arithmetic-onlyint.h
rename to lib/gnuastro-internal/arithmetic-and.h
index 16c36e2..4632a16 100644
--- a/lib/gnuastro-internal/arithmetic-onlyint.h
+++ b/lib/gnuastro-internal/arithmetic-and.h
@@ -20,16 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __GAL_ARITHMETIC_ONLYINT_H__
-#define __GAL_ARITHMETIC_ONLYINT_H__
-
-
-gal_data_t *
-arithmetic_onlyint_binary(int operator, unsigned char flags, gal_data_t *lo,
-                          gal_data_t *ro);
-
-gal_data_t *
-arithmetic_onlyint_bitwise_not(unsigned char flags, gal_data_t *in);
+#ifndef __ARITHMETIC_AND_H__
+#define __ARITHMETIC_AND_H__
 
+void
+arithmetic_and(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-binary.h
index 496cb9f..b1b79c3 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-binary.h
@@ -24,9 +24,254 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #define __ARITHMETIC_BINARY_H__
 
 
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+
+
+
+
+
+
+
+
+/************************************************************************/
+/*************             Low-level operators          *****************/
+/************************************************************************/
+/* Final step to be used by all operators and all types. */
+#define BINARY_OP_OT_RT_LT_SET(OP, OT, LT, RT) {                        \
+    LT lb, *la=l->array;                                                \
+    RT rb, *ra=r->array;                                                \
+    OT ob, *oa=o->array, *of=oa + o->size;                              \
+    if(checkblank)                                                      \
+      {                                                                 \
+        gal_blank_write(&lb, l->type);                                  \
+        gal_blank_write(&rb, r->type);                                  \
+        gal_blank_write(&ob, o->type);                                  \
+        do                                                              \
+          {                                                             \
+            if(lb==lb && rb==rb)/* Both are integers.                */ \
+              *oa = (*la!=lb  && *ra!=rb)  ? *la OP *ra : ob ;          \
+            else if(lb==lb)     /* Only left operand is an integer.  */ \
+              *oa = (*la!=lb  && *ra==*ra) ? *la OP *ra : ob;           \
+            else                /* Only right operand is an integer. */ \
+              *oa = (*la==*la && *ra!=rb)  ? *la OP *ra : ob;           \
+            if(l->size>1) ++la;                                         \
+            if(r->size>1) ++ra;                                         \
+          }                                                             \
+        while(++oa<of);                                                 \
+      }                                                                 \
+    else                                                                \
+      {                                                                 \
+        if(l->size==r->size) do *oa = *la++ OP *ra++; while(++oa<of);   \
+        else if(l->size==1)  do *oa = *la   OP *ra++; while(++oa<of);   \
+        else                 do *oa = *la++ OP *ra;   while(++oa<of);   \
+      }                                                                 \
+  }
+
+
+
+
+
+/* Blank values aren't defined for integer operators. */
+#define BINARY_INT_OP_OT_RT_LT_SET(OP, OT, LT, RT) {               \
+    LT *la=l->array;                                               \
+    RT *ra=r->array;                                               \
+    OT *oa=o->array, *of=oa + o->size;                             \
+    if(l->size==r->size) do *oa = *la++ OP *ra++; while(++oa<of);  \
+    else if(l->size==1)  do *oa = *la   OP *ra++; while(++oa<of);  \
+    else                 do *oa = *la++ OP *ra;   while(++oa<of);  \
+  }
+
+
+
+
+
+/* This is for operators like `&&' and `||', where the right operator is
+   not necessarily read (and thus incremented). */
+#define BINARY_OP_INCR_OT_RT_LT_SET(OP, OT, LT, RT) {                   \
+    LT *la=l->array;                                                    \
+    RT *ra=r->array;                                                    \
+    OT *oa=o->array, *of=oa + o->size;                                  \
+    if(l->size==r->size) do {*oa = *la++ OP *ra; ++ra;} while(++oa<of); \
+    else if(l->size==1)  do {*oa = *la   OP *ra; ++ra;} while(++oa<of); \
+    else                 do  *oa = *la++ OP *ra;        while(++oa<of); \
+  }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/************************************************************************/
+/*************              Type specifiers             *****************/
+/************************************************************************/
+
+/* Flags for BINARY_OP_RT_LT_SET to identify the output type. */
+enum arithmetic_binary_outtype_flags
+{
+  ARITHMETIC_BINARY_INVALID,                /* ==0 by C standard. */
+
+  ARITHMETIC_BINARY_OUT_TYPE_LEFT,
+  ARITHMETIC_BINARY_OUT_TYPE_RIGHT,
+  ARITHMETIC_BINARY_OUT_TYPE_UINT8,
+  ARITHMETIC_BINARY_OUT_TYPE_INCR_SEP,
+};
+
+
+
+
+
+/* For operators whose type may be any of the given inputs only for
+   integers. For integer operators we have less options. */
+#define BINARY_SET_OUT_INT(F, OP, LT, RT)                               \
+  switch(F)                                                             \
+    {                                                                   \
+    case ARITHMETIC_BINARY_OUT_TYPE_LEFT:                               \
+      BINARY_INT_OP_OT_RT_LT_SET(OP, LT, LT, RT);                       \
+      break;                                                            \
+    case ARITHMETIC_BINARY_OUT_TYPE_RIGHT:                              \
+      BINARY_INT_OP_OT_RT_LT_SET(OP, RT, LT, RT);                       \
+      break;                                                            \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: a bug! please contact us at %s to "   \
+            "address the problem. %d not recognized for `F'",           \
+            "BINARY_SET_OUT_INT", PACKAGE_BUGREPORT, F);                \
+    }
+
+
+
+
+
+/* For operators whose type may be any of the given inputs. */
+#define BINARY_SET_OUT(F, OP, LT, RT)                                   \
+  switch(F)                                                             \
+    {                                                                   \
+    case ARITHMETIC_BINARY_OUT_TYPE_LEFT:                               \
+      BINARY_OP_OT_RT_LT_SET(OP,      LT,      LT, RT);                 \
+      break;                                                            \
+    case ARITHMETIC_BINARY_OUT_TYPE_RIGHT:                              \
+      BINARY_OP_OT_RT_LT_SET(OP,      RT,      LT, RT);                 \
+      break;                                                            \
+    case ARITHMETIC_BINARY_OUT_TYPE_UINT8:                              \
+      BINARY_OP_OT_RT_LT_SET(OP,      uint8_t, LT, RT);                 \
+      break;                                                            \
+    case ARITHMETIC_BINARY_OUT_TYPE_INCR_SEP:                           \
+      BINARY_OP_INCR_OT_RT_LT_SET(OP, uint8_t, LT, RT);                 \
+      break;                                                            \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: a bug! please contact us at %s to "   \
+            "address the problem. %d not recognized for `F'",           \
+            "BINARY_SET_OUT", PACKAGE_BUGREPORT, F);                    \
+    }
+
+
+
+
+
+/* Set the right operator type only for integers (integer operators can't
+   take floating point types). So floating point types must not be in the
+   list of possibilities. */
+#define BINARY_SET_RT_INT(F, OP, LT)                                        \
+  switch(r->type)                                                           \
+    {                                                                       \
+    case GAL_TYPE_UINT8:   BINARY_SET_OUT_INT( F, OP, LT, uint8_t  ) break; \
+    case GAL_TYPE_INT8:    BINARY_SET_OUT_INT( F, OP, LT, int8_t   ) break; \
+    case GAL_TYPE_UINT16:  BINARY_SET_OUT_INT( F, OP, LT, uint16_t ) break; \
+    case GAL_TYPE_INT16:   BINARY_SET_OUT_INT( F, OP, LT, int16_t  ) break; \
+    case GAL_TYPE_UINT32:  BINARY_SET_OUT_INT( F, OP, LT, uint32_t ) break; \
+    case GAL_TYPE_INT32:   BINARY_SET_OUT_INT( F, OP, LT, int32_t  ) break; \
+    case GAL_TYPE_UINT64:  BINARY_SET_OUT_INT( F, OP, LT, uint64_t ) break; \
+    case GAL_TYPE_INT64:   BINARY_SET_OUT_INT( F, OP, LT, int64_t  ) break; \
+    default:                                                                \
+      error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "       \
+            "address the problem. %d is not a usable type code",            \
+            "BINARY_SET_RT", PACKAGE_BUGREPORT, r->type);                   \
+    }
+
+
+
+
+
+/* Set the right operator type. */
+#define BINARY_SET_RT(F, OP, LT)                                        \
+  switch(r->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_UINT8:   BINARY_SET_OUT( F, OP, LT, uint8_t  ) break; \
+    case GAL_TYPE_INT8:    BINARY_SET_OUT( F, OP, LT, int8_t   ) break; \
+    case GAL_TYPE_UINT16:  BINARY_SET_OUT( F, OP, LT, uint16_t ) break; \
+    case GAL_TYPE_INT16:   BINARY_SET_OUT( F, OP, LT, int16_t  ) break; \
+    case GAL_TYPE_UINT32:  BINARY_SET_OUT( F, OP, LT, uint32_t ) break; \
+    case GAL_TYPE_INT32:   BINARY_SET_OUT( F, OP, LT, int32_t  ) break; \
+    case GAL_TYPE_UINT64:  BINARY_SET_OUT( F, OP, LT, uint64_t ) break; \
+    case GAL_TYPE_INT64:   BINARY_SET_OUT( F, OP, LT, int64_t  ) break; \
+    case GAL_TYPE_FLOAT32: BINARY_SET_OUT( F, OP, LT, float    ) break; \
+    case GAL_TYPE_FLOAT64: BINARY_SET_OUT( F, OP, LT, double   ) break; \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "   \
+            "address the problem. %d is not a usable type code",        \
+            "BINARY_SET_RT", PACKAGE_BUGREPORT, r->type);               \
+    }
+
+
+
+
+
+/* Set the left operator type only for integers (integer operators can't
+   take floating point types). So floating point types must not be in the
+   list of possibilities. */
+#define BINARY_SET_LT_INT(F, OP)                                        \
+  switch(l->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_UINT8:   BINARY_SET_RT_INT( F, OP, uint8_t  ) break;  \
+    case GAL_TYPE_INT8:    BINARY_SET_RT_INT( F, OP, int8_t   ) break;  \
+    case GAL_TYPE_UINT16:  BINARY_SET_RT_INT( F, OP, uint16_t ) break;  \
+    case GAL_TYPE_INT16:   BINARY_SET_RT_INT( F, OP, int16_t  ) break;  \
+    case GAL_TYPE_UINT32:  BINARY_SET_RT_INT( F, OP, uint32_t ) break;  \
+    case GAL_TYPE_INT32:   BINARY_SET_RT_INT( F, OP, int32_t  ) break;  \
+    case GAL_TYPE_UINT64:  BINARY_SET_RT_INT( F, OP, uint64_t ) break;  \
+    case GAL_TYPE_INT64:   BINARY_SET_RT_INT( F, OP, int64_t  ) break;  \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "   \
+            "address the problem. %d is not a usable type code",        \
+            "BINARY_SET_LT_INT", PACKAGE_BUGREPORT, l->type);           \
+    }
+
+
+
+
+
+/* Set the left operator type. */
+#define BINARY_SET_LT(F, OP)                                            \
+  switch(l->type)                                                       \
+    {                                                                   \
+    case GAL_TYPE_UINT8:   BINARY_SET_RT( F, OP, uint8_t  ) break;      \
+    case GAL_TYPE_INT8:    BINARY_SET_RT( F, OP, int8_t   ) break;      \
+    case GAL_TYPE_UINT16:  BINARY_SET_RT( F, OP, uint16_t ) break;      \
+    case GAL_TYPE_INT16:   BINARY_SET_RT( F, OP, int16_t  ) break;      \
+    case GAL_TYPE_UINT32:  BINARY_SET_RT( F, OP, uint32_t ) break;      \
+    case GAL_TYPE_INT32:   BINARY_SET_RT( F, OP, int32_t  ) break;      \
+    case GAL_TYPE_UINT64:  BINARY_SET_RT( F, OP, uint64_t ) break;      \
+    case GAL_TYPE_INT64:   BINARY_SET_RT( F, OP, int64_t  ) break;      \
+    case GAL_TYPE_FLOAT32: BINARY_SET_RT( F, OP, float    ) break;      \
+    case GAL_TYPE_FLOAT64: BINARY_SET_RT( F, OP, double   ) break;      \
+    default:                                                            \
+      error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "   \
+            "address the problem. %d is not a usable type code",        \
+            "BINARY_SET_LT", PACKAGE_BUGREPORT, l->type);               \
+    }
+
 
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-bitand.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-bitand.h
index 496cb9f..bb221a0 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-bitand.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_BITAND_H__
+#define __ARITHMETIC_BITAND_H__
 
+void
+arithmetic_bitand(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-bitlsh.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-bitlsh.h
index 496cb9f..8311124 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-bitlsh.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_BITLSH_H__
+#define __ARITHMETIC_BITLSH_H__
 
+void
+arithmetic_bitlsh(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-bitor.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-bitor.h
index 496cb9f..5cd2cb5 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-bitor.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_BITOR_H__
+#define __ARITHMETIC_BITOR_H__
 
+void
+arithmetic_bitor(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-bitrsh.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-bitrsh.h
index 496cb9f..bbe8695 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-bitrsh.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_BITRSH_H__
+#define __ARITHMETIC_BITRSH_H__
 
+void
+arithmetic_bitrsh(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-bitxor.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-bitxor.h
index 496cb9f..a94eede 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-bitxor.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_BITXOR_H__
+#define __ARITHMETIC_BITXOR_H__
 
+void
+arithmetic_bitxor(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-divide.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-divide.h
index 496cb9f..fb93428 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-divide.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_DIVIDE_H__
+#define __ARITHMETIC_DIVIDE_H__
 
+void
+arithmetic_divide(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-eq.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-eq.h
index 496cb9f..a5947bf 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-eq.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_EQ_H__
+#define __ARITHMETIC_EQ_H__
 
+void
+arithmetic_eq(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-ge.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-ge.h
index 496cb9f..f1346f7 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-ge.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_GE_H__
+#define __ARITHMETIC_GE_H__
 
+void
+arithmetic_ge(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-gt.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-gt.h
index 496cb9f..5b2c9e8 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-gt.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_GT_H__
+#define __ARITHMETIC_GT_H__
 
+void
+arithmetic_gt(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-internal.h 
b/lib/gnuastro-internal/arithmetic-internal.h
index 34578a9..d9cd846 100644
--- a/lib/gnuastro-internal/arithmetic-internal.h
+++ b/lib/gnuastro-internal/arithmetic-internal.h
@@ -59,13 +59,13 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 __BEGIN_C_DECLS  /* From C++ preparations */
 
 int
-gal_arithmetic_binary_out_type(int operator, gal_data_t *l, gal_data_t *r);
+gal_arithmetic_binary_checkblank(gal_data_t *l, gal_data_t *r);
 
 char *
 gal_arithmetic_operator_string(int operator);
 
 gal_data_t *
-gal_arithmetic_convert_to_compiled_type(gal_data_t *in, unsigned char flags);
+gal_arithmetic_convert_to_compiled_type(gal_data_t *in, int flags);
 
 
 
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-le.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-le.h
index 496cb9f..b45866e 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-le.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_LE_H__
+#define __ARITHMETIC_LE_H__
 
+void
+arithmetic_le(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-lt.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-lt.h
index 496cb9f..40fe879 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-lt.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_LT_H__
+#define __ARITHMETIC_LT_H__
 
+void
+arithmetic_lt(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-minus.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-minus.h
index 496cb9f..5a977b0 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-minus.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_MINUS_H__
+#define __ARITHMETIC_MINUS_H__
 
+void
+arithmetic_minus(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-modulo.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-modulo.h
index 496cb9f..2671d5f 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-modulo.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_MODULO_H__
+#define __ARITHMETIC_MODULO_H__
 
+void
+arithmetic_modulo(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-multiply.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-multiply.h
index 496cb9f..b951006 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-multiply.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_MULTIPLY_H__
+#define __ARITHMETIC_MULTIPLY_H__
 
+void
+arithmetic_multiply(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-ne.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-ne.h
index 496cb9f..e54b9c0 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-ne.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_NE_H__
+#define __ARITHMETIC_NE_H__
 
+void
+arithmetic_ne(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-or.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-or.h
index 496cb9f..e2763f6 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-or.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_OR_H__
+#define __ARITHMETIC_OR_H__
 
+void
+arithmetic_or(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro-internal/arithmetic-binary.h 
b/lib/gnuastro-internal/arithmetic-plus.h
similarity index 84%
copy from lib/gnuastro-internal/arithmetic-binary.h
copy to lib/gnuastro-internal/arithmetic-plus.h
index 496cb9f..cf6ddcc 100644
--- a/lib/gnuastro-internal/arithmetic-binary.h
+++ b/lib/gnuastro-internal/arithmetic-plus.h
@@ -20,13 +20,10 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/
-#ifndef __ARITHMETIC_BINARY_H__
-#define __ARITHMETIC_BINARY_H__
-
-
-gal_data_t *
-arithmetic_binary(int operator, uint8_t flags, gal_data_t *lo,
-                  gal_data_t *ro);
+#ifndef __ARITHMETIC_PLUS_H__
+#define __ARITHMETIC_PLUS_H__
 
+void
+arithmetic_plus(gal_data_t *l, gal_data_t *r, gal_data_t *o);
 
 #endif
diff --git a/lib/gnuastro/arithmetic.h b/lib/gnuastro/arithmetic.h
index ba20c6a..f5a2b8a 100644
--- a/lib/gnuastro/arithmetic.h
+++ b/lib/gnuastro/arithmetic.h
@@ -139,7 +139,7 @@ enum gal_arithmetic_operators
 
 
 gal_data_t *
-gal_arithmetic(int operator, unsigned char flags, ...);
+gal_arithmetic(int operator, int flags, ...);
 
 
 
diff --git a/lib/match.c b/lib/match.c
index 98da33a..3bd120d 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -495,6 +495,7 @@ match_coordinates_second_in_first(gal_data_t *A, gal_data_t 
*B,
   double dist[3]={NAN, NAN, NAN}, delta[3]={NAN, NAN, NAN};
   double *a[3]={NULL, NULL, NULL}, *b[3]={NULL, NULL, NULL};
 
+
   /* Necessary preperations. */
   match_coordinates_sif_prepare(A, B, aperture,  ndim, a, b, dist, c, s,
                                 &iscircle);
diff --git a/lib/options.c b/lib/options.c
index 868d362..6e4d8f8 100644
--- a/lib/options.c
+++ b/lib/options.c
@@ -221,6 +221,7 @@ gal_options_print_citation(struct argp_option *option, char 
*arg,
                            char *filename, size_t lineno, void *pa)
 {
   struct gal_options_common_params *cp=(struct gal_options_common_params *)pa;
+  char *gnuastro_acknowledgement;
   char *gnuastro_bibtex=
     "Gnuastro package/infrastructure\n"
     "-------------------------------\n"
@@ -249,17 +250,35 @@ gal_options_print_citation(struct argp_option *option, 
char *arg,
   /* Print the statements. */
   printf("\nThank you for using %s (%s) %s.\n\n", cp->program_name,
          PACKAGE_NAME, PACKAGE_VERSION);
-  printf("Citations are vital for the continued work on Gnuastro.\n\n"
-         "Please cite these BibTeX record(s) in your paper(s).\n"
-         "(don't forget to also include the version as shown above)\n\n"
-         "%s\n\n",
-         gnuastro_bibtex);
+  printf("Citations and acknowledgement are vital for the continued "
+         "work on Gnuastro.\n\n"
+         "Please cite the following record(s) and add the acknowledgement "
+         "statement below in your work to support us. Please note that "
+         "different Gnuastro programs may have different corresponding "
+         "papers. Hence, please check all the programs you used. Don't "
+         "forget to also include the version as shown above for "
+         "reproducibility.\n\n"
+         "%s\n\n", gnuastro_bibtex);
 
 
   /* Only print the citation for the program if one exists. */
   if(cp->program_bibtex[0]!='\0') printf("%s\n\n", cp->program_bibtex);
 
 
+  /* Notice for acknowledgements. */
+  asprintf(&gnuastro_acknowledgement,
+           "Acknowledgement\n"
+           "---------------\n"
+           "This work was partly done using GNU Astronomy Utilities "
+           "(Gnuastro) version %s. Gnuastro is a generic package for "
+           "astronomical data manipulation and analysis which was "
+           "initially created and developed for research funded by the "
+           "Monbukagakusho (Japanese government) scholarship and ERC "
+           "advanced grant 339659-MUSICOS.", PACKAGE_VERSION);
+  printf("%s\n", gnuastro_acknowledgement);
+  free(gnuastro_acknowledgement);
+
+
   /* Print a thank you message. */
   printf("                                               ,\n"
          "                                              {|'--.\n"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9943b6c..6898cfc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -51,11 +51,6 @@ endif
 if COND_HASGNULIBTOOL
   MAYBE_HASGNULIBTOOL = "yes"
 endif
-if COND_NO_CPP_QUNUSED_ARGUMENTS_PROBLEM
-  MAYBE_VERSIONCPP    = versioncpp
-  MAYBE_VERSIONCPP_SH = lib/versioncpp.sh
-  versioncpp_SOURCES  = lib/versioncpp.cpp
-endif
 if COND_ARITHMETIC
   MAYBE_ARITHMETIC_TESTS = arithmetic/snimage.sh arithmetic/onlynumbers.sh \
   arithmetic/where.sh arithmetic/or.sh
@@ -222,8 +217,9 @@ export hasghostscript=$(MAYBE_HASGHOSTSCRIPT);
 # `TESTS'. So they do not need to be specified as any dependency, they will
 # be present when the `.sh' based tests are run.
 LDADD = -lgnuastro
-check_PROGRAMS = multithread $(MAYBE_VERSIONCPP)
+check_PROGRAMS = multithread versioncxx
 multithread_SOURCES = lib/multithread.c
+versioncxx_SOURCES  = lib/versioncxx.cpp
 lib/multithread.sh: mkprof/mosaic1.sh.log
 
 
@@ -231,7 +227,7 @@ lib/multithread.sh: mkprof/mosaic1.sh.log
 
 # Final Tests
 # ===========
-TESTS = prepconf.sh lib/multithread.sh $(MAYBE_VERSIONCPP_SH)              \
+TESTS = prepconf.sh lib/multithread.sh lib/versioncxx.sh              \
   $(MAYBE_ARITHMETIC_TESTS) $(MAYBE_BUILDPROG_TESTS)                       \
   $(MAYBE_CONVERTT_TESTS) $(MAYBE_CONVOLVE_TESTS) $(MAYBE_COSMICCAL_TESTS) \
   $(MAYBE_CROP_TESTS) $(MAYBE_FITS_TESTS) $(MAYBE_MATCH_TESTS)             \
diff --git a/tests/lib/versioncpp.cpp b/tests/lib/versioncxx.cpp
similarity index 100%
rename from tests/lib/versioncpp.cpp
rename to tests/lib/versioncxx.cpp
diff --git a/tests/lib/versioncpp.sh b/tests/lib/versioncxx.sh
similarity index 97%
rename from tests/lib/versioncpp.sh
rename to tests/lib/versioncxx.sh
index 24cfed2..5438c14 100755
--- a/tests/lib/versioncpp.sh
+++ b/tests/lib/versioncxx.sh
@@ -22,7 +22,7 @@
 # Set the variables (The executable is in the build tree). Do the
 # basic checks to see if the executable is made or if the defaults
 # file exists (basicchecks.sh is in the source tree).
-execname=./versioncpp
+execname=./versioncxx
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]